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

Re: All ECMAScript attributes should be non-configurable

From: Brendan Eich <brendan@mozilla.org>
Date: Fri, 23 Sep 2011 17:52:43 -0700
Cc: public-script-coord@w3.org
Message-Id: <19360580-195D-4302-A69C-3CCC682C5087@mozilla.org>
To: David Bruant <david.bruant@labri.fr>
On Sep 23, 2011, at 3:53 PM, David Bruant wrote:

> Currently, on Chrome and Opera (12), event attributes are configurable
> own properties (data in the former, accessor in the latter).
> Consequently, the freedom to prevent all events to have a "type" or
> "target" attribute doesn't exist by design.
> Do anyone miss that freedom? In other words, are there use cases of
> wanting this freedom at all or is it just a side-effect of putting
> properties on the prototype and defaulting to configurable=true because
> a choice has to be made?

The "own" vs. prototype design is intentional. The non-configurable is too. The combination does make a destroy-the-world button. But is it really a problem? Same thing can happen with Object.prototype.toString.

/be
Received on Saturday, 24 September 2011 00:53:12 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:04 UTC