Re: [dom] Supported property names for NamedNodeMap (#141)

If we return the lowercased version of the attribute, it would still be wrong, since `ele.attributes.hasOwnProperty("a:new")` would still return false and `newP.attributes["a:new"]` would still be undefined (lowercasing only happens on the input side).

I think what we need to do is check `NamedNodeMap`'s associated element for being in the HTML namespace and its associated document being an HTML document. Then for each attribute we lowercase it, and if it's no longer equal to itself, we ignore it (we could also check for an "uppercase" code point, but we don't have that primitive at the moment). Apart from that we keep the requirements around removing duplicates and using attribute list order.

This will require changes to Gecko as currently it does return uppercase attribute names. It will also require changes to other browser for unrelated changes. Once we fix this we should also file a bug against wpt.

Does that make sense @bzbarsky?

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

Received on Wednesday, 6 January 2016 11:25:12 UTC