W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2013

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

From: Cameron McCormack <cam@mcc.id.au>
Date: Tue, 02 Jul 2013 17:05:35 +1000
Message-ID: <51D27BBF.5050703@mcc.id.au>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>
Boris Zbarsky wrote:
> 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.

I don't think there are use cases, so I've made the changes you suggest:

http://dev.w3.org/cvsweb/2006/webapi/WebIDL/Overview.xml.diff?r1=1.633;r2=1.634;f=h
http://dev.w3.org/cvsweb/2006/webapi/WebIDL/v1.xml.diff?r1=1.81;r2=1.82;f=h
Received on Tuesday, 2 July 2013 07:09:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:50 UTC