Closed Bug 315805 Opened 16 years ago Closed 4 years ago

setAttribute("xmlns", "...") should throw

Categories

(Core :: DOM: Core & HTML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: bzbarsky, Unassigned)

References

Details

Attachments

(1 file)

Sicking says that setting an attribute named "xmlns" in the null namespace is an error and should throw.
When fixing this we should add an assertion in the nodeinfomanager that makes sure we never create nodeinfos with localname or prefix 'xmlns' without having the right namespace. Or with the xmlns-namespace without having a proper localname or prefix.

Same thing applies to the prefix 'xml' and the xml-namespace.
Attached file demo
*** Bug 327542 has been marked as a duplicate of this bug. ***
Assignee: general → nobody
QA Contact: ian → general
FYI: since nobody implemented this I'm removing this restriction from DOM. See also https://www.w3.org/Bugs/Public/show_bug.cgi?id=16493 I recommend WONTFIX.
Marking invalid per the standard: https://dom.spec.whatwg.org/#dom-element-setattribute.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.