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

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 19 Oct 2012 09:07:46 -0400
Message-ID: <508150A2.10406@mit.edu>
To: "public-script-coord@w3.org" <public-script-coord@w3.org>
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 


[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

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