W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2011

[whatwg] Unforgeable document property

From: David Bruant <bruant@enseirb-matmeca.fr>
Date: Fri, 23 Sep 2011 11:54:48 +0200
Message-ID: <4E7C5768.4000600@enseirb-matmeca.fr>
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.

David

[1] http://html5.org/tools/web-apps-tracker?from=6568&to=6569
[2] http://wiki.ecmascript.org/doku.php?id=harmony:proxies
Received on Friday, 23 September 2011 02:54:48 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:36 UTC