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

Re: [whatwg] Unforgeable document property

From: David Bruant <david.bruant@labri.fr>
Date: Fri, 23 Sep 2011 21:07:42 +0200
Message-ID: <4E7CD8FE.1010501@labri.fr>
To: Ian Hickson <ian@hixie.ch>
CC: David Bruant <bruant@enseirb-matmeca.fr>, public-script-coord@w3.org
Le 23/09/2011 20:54, Ian Hickson a écrit :
> On Fri, 23 Sep 2011, David Bruant wrote:
>> [with correct public-script-coord address]
>> Le 23/09/2011 11:54, David Bruant a écrit :
>>> Hi,
>>> I have noticed on a recent commit [1] that the "document" property of the
>>> window object is now defined as [[Unforgeable]] (and still readonly). As per
>>> WebIDL, it makes the property non-configurable (in ECMAScript 5 terms).
>>> Consequently, it will make impossible to wrap the object document with an
>>> ES.next proxy [2] and replace the "document" property value with the wrapped
>>> document.
>>> I think that there is definitely a use case here as replacing the document
>>> with a proxy could help developers fixing the DOM and adding workarounds to
>>> browser bugs. Consequently, I think the "document" property of the window
>>> object should be kept configurable.
> Is this compatible with the Web?
It would be backward compatible (unless there are script currently
relying on error being thrown because of non-configurability), but not
aligned with current implementations.

> The change was made to align the spec with implementations.
If that's the justification, then ok, i take back what i said.

Received on Friday, 23 September 2011 19:08:11 UTC

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