Bug 14746 - Clarify what happens when you try using unsupported property indexes
Summary: Clarify what happens when you try using unsupported property indexes
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: WebIDL (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Cameron McCormack
QA Contact: public-webapps-bugzilla
Depends on:
Reported: 2011-11-09 20:11 UTC by Aryeh Gregor
Modified: 2011-12-27 15:22 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Aryeh Gregor 2011-11-09 20:11:19 UTC says:

The following requirements apply to the definitions of indexed property getters, setters, creators and deleters:

* If an indexed property getter was specified using an operation with an identifier, then the value returned when indexing the object with a given index is the value that would be returned by invoking the operation, passing the index as its only argument.

By itself, this makes it look like this is true for *any* index.  I was confused and thought this is what was actually intended (see bug 14743).  However, 4.7.2 defines that if the index is not a supported property index, nothing special happens, and regular ES behavior takes hold.

Perhaps "when indexing the object with a given index" should be changed to "when indexing the object with a given supported property index" or something?  Are there other places where similar changes are needed?
Comment 1 Cameron McCormack 2011-12-13 00:50:43 UTC
I think it's fair enough to want to clarify this.  I've done as you suggested and used "supported property index" instead of "property index" for the getter, setter and deleter dot points (but not for creators, since they necessarily work with indices that aren't yet supported).  I've also added a clarifying note/example below that list, and added a similar note and changes to the "Named properties" section.


Please let me know if this resolution is satisfactory.
Comment 2 Aryeh Gregor 2011-12-27 15:22:45 UTC
Looks good to me.  Thanks!