This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
<http://dev.w3.org/2006/webapi/WebIDL/#property-enumeration> has | If the object supports named properties, then the object’s supported | property names are enumerated next, in the order given in the | definition of the set of supported property names. We don't give such an order.
And I needed a place to stick this: http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1438
https://github.com/whatwg/dom/commit/e4c52f949bdc3adf53dc0ebd40155fe5de0eced2
Sorry, what the spec says now is nonsense. Apart from being very difficult to parse, it at best doesn't define the order in this simple case: <img id="foo" name="bar"> and similar in more complicated cases like: <img id="foo" name="bar"> <img id="bar" name="foo"> and whatnot.
How about this: The supported property names are in the return value of these steps: * Let /set/ be an empty list. * For each element represented by the collection, if any: * If the element is a a, applet, area, embed, form, frame, frameset, iframe, img, or object element in the HTML namespace and has a name attribute whose value is not in /set/, append its value to /set/. * If the element has an ID and its ID is not in /set/, append ID to /set/. * Return /set/. And my apologies for yesterday's commit.
That's much better, yeah (and no need to apologize!). On a slightly unrelated note, the exact set of tagnames involved makes me sad, especially because it doesn't match the set of things that show up as named properties on the document. For what it's worth, Gecko just exposes all names here, and I believe Opera may as well, based on some quick testing. Is there really a reason to not do that?
Okay, widened to include all elements in the HTML namespace (quick test showed that <svg name=svg> didn't do anything in either Gecko or Opera). https://github.com/whatwg/dom/commit/1400a64aff1f2155f9cfa935624b4bfbc4f7c66b
Thanks. I think Gecko is inconsistent about the SVG case: it exposes it as a supported name but does not enumerate it. The former is probably a bug, though.