Re: [dom] setAttributeNode should not change order of existing attributes (#116)

You beat me to it, but this is what I was writing:

The order of attributes can be observed in the `element.attributes` NamedNodeMap. When calling `element.setAttributeNode(attr)` where there is already an attribute with the same namespaceURI and localName, one of two things could happen:
 1. The old attribute could be removed, and the new attribute appended.
 2. The old attribute could be replaced with the new attribute in-place.

The spec and Gecko do option 1. Blink, Edge and WebKit do option 2. It's unlikely that there's any compatibility risk here, it's rather a matter of getting to an interoperable state and forgetting about these APIs.



---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/116#issuecomment-159303430

Received on Tuesday, 24 November 2015 15:25:27 UTC