- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Tue, 24 Sep 2013 15:06:18 -0400
- To: www-style@w3.org
On 9/24/13 2:46 PM, Rik Cabanier wrote: > Making DOMPoint a dictionary, as currently proposed, is a problem > since it means other objects (such as the proposed DOMQuad) can't > have DOMPoints as attributes. I'm assuming the WebIDL restriction > that attributes can't be dictionaries is not easily removed. > > > Why can't interfaces have dictionary attributes in IDL? Because dictionaries are passed by value. So if your interface had a dictionary attribute, obj.attr would be a new object every time. In addition to being terrible for performance, it would make obj.attr == obj.attr test false, which is clearly not desirable. -Boris
Received on Tuesday, 24 September 2013 19:06:50 UTC