[webidl] Spec is unclear on what it means to support indexed/named properties

Specifically, the spec says [1]:

   An interface that defines an indexed property getter, indexed
   property setter, indexed property creator and/or an indexed
   property deleter is said to support indexed properties.

(and similar for named properties).  At first glance, that sounds like 
if the interface has any of those four then it supports indexed 
properties.  However the definition of platform object 
[[GetOwnProperty]] seems to assume that any object that supports indexed 
properties has an indexed getter (see step 2.2.1 of [[GetOwnProperty]], 
at [2]).  Again, similar for named properties.

Are there any use cases for having creator/setter/deleter _without_ a 
getter?  If not, I propose that we define "supports indexed properties" 
as "has an indexed getter" and likewise for named properties, and 
require that an interface that has a creator, setter, or deleter also 
have a getter.

If there _are_ such use cases, the spec needs to be changed to describe 
what happens when indexed/named properties are supported but there is no 
getter.

-Boris

[1] http://dev.w3.org/2006/webapi/WebIDL/#idl-indexed-properties
[2] http://dev.w3.org/2006/webapi/WebIDL/#getownproperty

Received on Friday, 19 October 2012 13:08:17 UTC