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

Hi,

I was wondering if anyone could help clarify expected behavior of [[GetOwnProperty]] for named properties of the Window object.  (It looks like this falls across the HTML5 & WebIDL specs, apologies if this is the wrong place to ask).

Per WebIDLís definition of [Global] (http://dev.w3.org/2006/webapi/WebIDL/#Global) the named properties are exposed on a named properties object on the prototype chain.
Per section 4.5.5.1 (http://dev.w3.org/2006/webapi/WebIDL/#named-properties-object) the [[GetOwnProperty]] implementation should return a descriptor with writable set to false, enumerable and configurable set to true.

Firefox and Chrome both return descriptors from an object on the prototype chain per the spec, attributes of the value are configured differently, with enumerable set to false, writable and configurable set to true.

There seem to be some compelling reasons to follow Firefox / Chrome (writable true seems more congruent with ECMA262 specified [[Put]], unless there is another mechanism Iím missing here, enumerable is odd since I donít think the spec says anything about [[GetOwnPropertyNames]]),so I was hoping to better understand why the spec requires the behaviour it does (or whether Iím just following it incorrectly!)

Many thanks,
Gavin

Received on Thursday, 5 September 2013 22:46:21 UTC