- From: Erik Arvidsson <arv@chromium.org>
- Date: Fri, 30 Sep 2011 14:19:55 -0700
- To: David Bruant <david.bruant@labri.fr>
- Cc: Alex Russell <slightlyoff@google.com>, public-script-coord@w3.org
On Fri, Sep 30, 2011 at 14:05, David Bruant <david.bruant@labri.fr> wrote: > Currently, in Chrome, attributes are not inherited. Operations are, but > attributes are not. Attributes are exposed as own properties when the object > (event for instance) is created. This guarantees by design, that all event > object have a "target" property for instance. We have a bug to fix this to match WebIDL and IE9. https://bugs.webkit.org/show_bug.cgi?id=49739 > This guarantee is lost in WebIDL because of inheritance + > non-configurability. I think it's a loss. You may disagree and i'd would > like to hear arguments against it. To allow subclassing and allow using monkey patching to fix bugs in implementations. > I'm with Travis and Alex here. Configurability is part of JavaScript and the > web. > > I agree partly. This pattern of "object attributes represented as a > configurable inherited getter/setter pair" has never been part of the web. > Not the standardized web at least (mostly because of a lack of > specification I think). Firefox was first to implement a semi native DOM. It still has quirks where the DOM does not follow ES semantics. If the DOM was designed for the web today I'm sure we would not rely on magical value properties and proxies. By speccing WebIDL attributes to be reflected as getter-setter-pairs on the prototype we are removing one of the warts. -- erik
Received on Friday, 30 September 2011 21:20:41 UTC