On 12/2/14, 4:59 AM, Andreas Rossberg wrote:
On 1 December 2014 at 03:12, Mark S. Miller <erig...@google.com> wrote:
On Sun, Nov 30, 2014 at 12:21 PM, Boris Zbarsky <bzbar...@mit.edu> wrote:
Per spec ES6, it seems to me like attempting to define a non-configurable
property on a WindowProxy should throw and getting a property descriptor for
a non-configurable property that got defined on the Window (e.g. via "var")
should report it as configurable.

Can you clarify? Do you mean that it should report properties as
configurable, but still reject attempts to actually reconfigure them?

Yes, correct.

Also, how would you allow 'var' to even define non-configurable
properties?

Because "var" operates on the global directly. The global is a Window, not a WindowProxy and has no magic behavior.

If you want DefineProperty to throw on any such attempt,
then 'var' semantics would somehow have to bypass the MOP.

The idea is that WindowProxy's [[DefineOwnProperty]] would throw as needed. Window's [[DefineOwnProperty]] is just http://people.mozilla.org/~jorendorff/es6-draft.html#sec-ordinarydefineownproperty

-Boris
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to