Created attachment 525645 [details] [diff] [review] Patch v1
Is this web-compatible? I thought browsers had converged on getAttribute and getAttributeNS returning "" and the DOM spec just hadn't been errata'd accordingly (and that Web DOM Core was going to make that change).
Almost. Browsers have converged on getAttribute returning null, while DOM specs required the empty string. (<http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-666EE0F9>.) IIRC, there was no consensus either way for getAttributeNS, but it seems to make more sense to have them consistent.
Oh, ok. so I just had it backwards. Gotcha.
Comment on attachment 525645 [details] [diff] [review] Patch v1 How woudl you feel about doing this in GetAttr instead? There shouldn't be too many implementations of that.
That works for me. (I understood void strings to be frowned upon except for passing to JS directly, though.)
Created attachment 586800 [details] [diff] [review] Patch v2
Comment on attachment 586800 [details] [diff] [review] Patch v2 Yeah, no. This makes reflected attributes return null, and that breaks the web.
Docs updated: https://developer.mozilla.org/en/DOM/element.getAttributeNS Mentioned on Firefox 13 for developers.