Re: Contacts API -- attribute order

A couple thoughts  on this general topic.

1) WebDL clause 3 should not say anything about enumeration of attributes or operations as this isn't a language independent capability. (I think it is currently fine in this regard).  It should say in 3.3.2 that the physical ordering of attributes in WebIDL fragments does not imply an enumeration ordering or any other implicit semantics. 
2) the only thing that Clause 4.7.6 should say is that it defers to the ECMAScript specification in this regard.  In addition it should not attempt to specify the enumerations that is currently does.  In practice a Web API that is implemented using ES may not have any control over enumeration order so requiring one isn't helpful.
3) Web APIs should never be designed with the expatiation that the enumeration order has any semantic significance.  If an API needs to accept or return an ordered set of values then it should explicitly use the WebIDL Array or Sequence type rather than an object interface.  This should be explicitly stated somewhere.  Perhaps in 4.7.6 or perhaps in 3.9.18/19.


Basically, leave it to TC39 to struggle with ES property enumeration issues, but make sure that no Web API are defined that depend upon a specific ES property enumeration order.

Allen

Received on Thursday, 25 August 2011 16:34:14 UTC