Re: [whatwg] [[GetOwnProperty]] for named properties of the Window object

On Sep 12, 2013, at 11:43 AM, Boris Zbarsky <bzbarsky@MIT.EDU> wrote:

> On 9/12/13 2:36 PM, Gavin Barraclough wrote:
>> Hmmm, interesting.  I was thinking that in the case that a shadowing
>> property was put to the named property object itself
> 
> Can't be done.  Looking at the ES5 [[Put]], ownDesc is a data descriptor here, so we land in step 3b, which calls [[DefineOwnProperty]], which is defined at http://dev.w3.org/2006/webapi/WebIDL/#named-properties-object-defineownpropertyand throws if "Throw" and silently does nothing otherwise.  ES6 is similar.

Ah, good point.  Firefox, Safari, Chrome all currently all allow this, but seems reasonable to prohibit.

cheers,
G.

>> then deleted
> 
> Also can't be done.  See http://dev.w3.org/2006/webapi/WebIDL/#named-properties-object-delete
> 
>> Many thanks,
> 
> No problem!
> 
> -Boris

Received on Thursday, 12 September 2013 20:50:55 UTC