W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2014

Re: Figuring out the behavior of WindowProxy in the face of non-configurable properties

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Tue, 02 Dec 2014 07:36:18 -0800
Message-ID: <547DDC72.1090107@mit.edu>
To: Andreas Rossberg <rossberg@google.com>, "Mark S. Miller" <erights@google.com>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>, es-discuss <es-discuss@mozilla.org>
On 12/2/14, 4:59 AM, Andreas Rossberg wrote:
> On 1 December 2014 at 03:12, Mark S. Miller <erights@google.com> wrote:
>> On Sun, Nov 30, 2014 at 12:21 PM, Boris Zbarsky <bzbarsky@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
Received on Tuesday, 2 December 2014 15:36:51 UTC

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