This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
This doesn't define the order of the array: "The attributes attribute must return a read only array of the context object's associated attributes."
The order in which they were added to the element. In particular, setAttribute/setAttributeNS say "*Append* this attribute to the context object's attributes." I've tried to make this cleared by using "list of attributes" instead of "collection of attributes": <http://dvcs.w3.org/hg/domcore/rev/f1ac828a0830>. I've filed bug 13917 to fix the "create an element for a token" definition in HTML, which doesn't define in what the order the attributes are added.
Bug 13917 was WONTFIXed. Attributes in markup are conceptually unordered. If the API exposes an order, it's the API that should define the order, IMHO.
So if we have multiple disparate APIs they can all do their own thing? I think either we have a consistent order, we have a random order, or we have it implementation-defined and hope nobody starts depending on anything. I vastly prefer consistent order over the alternatives.
*** This bug has been marked as a duplicate of bug 17871 ***