W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2011

Re: All ECMAScript attributes should be non-configurable

From: Erik Arvidsson <arv@chromium.org>
Date: Fri, 30 Sep 2011 14:19:55 -0700
Message-ID: <CAJ8+GogB5AAUmww4k0+SPtB1scB4tT7YJ5YxrQOzhVo_pgw0DQ@mail.gmail.com>
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.


> 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

> 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.

Received on Friday, 30 September 2011 21:20:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:04 UTC