[Webkit-unassigned] [Bug 22958] Attribute namespaces are serialized as if they were element ones
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Apr 4 02:11:23 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=22958
Leo B <webkitbooger at nrvr.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |webkitbooger at nrvr.com
--- Comment #3 from Leo B <webkitbooger at nrvr.com> 2013-04-04 02:09:35 PST ---
Still seeing essentially same problem in Google Chrome Version 26.0.1410.43 m.
As verified in the developer tools debugger, in scope variables, setAttributeNS does this:
For the element creates an attribute, but the attribute's namespaceURI is null.
And for the element it creates a second attribute that hasn't been asked for, of name xmlns with value being what should have been the namespaceURI of the attribute that has been asked for.
The solution / workaround is: Pass in a qualified name and it will work! For most compatibility, you probably should get the prefix with yourElement.lookupPrefix(yourNamespaceURI).
Workaround found by paying attention to http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-ElSetAttrNS where it says the second parameter is the qualifiedName, the qualified name of the attribute to create or alter.
Problem found when running new tests in http://srguiwiz.github.com/adj-js/user-docs/tests.html and it failed in Chrome as a consequence of setAttributeNS behavior. It had passed in Firefox. Since then fixed http://srguiwiz.github.com/adj-js/user-docs/ to use qualified name, now it works in Chrome as well.
Does this workaround and the specification mean this isn't a bug any more?
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list