Closed
Bug 3302
Opened 26 years ago
Closed 26 years ago
SetAttribute not working
Categories
(Core :: DOM: Core & HTML, defect, P1)
Tracking
()
VERIFIED
FIXED
People
(Reporter: hyatt, Assigned: waterson)
Details
(Whiteboard: 3/25: Requested developer to verify)
I've had several complaints that SetAttribute isn't working properly.
An assertion is being thrown. (In the test case, no namespace is specified.)
Reporter | ||
Comment 1•26 years ago
|
||
It appears that GetResource has a precondition that the namespace not be
unknown. So SetAttribute never works.
Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 2•26 years ago
|
||
Fixed this by allowing kNameSpaceID_None to match _any_ attribute in
GetAttribute(), and making ParseAttributeString() return kNameSpaceID_None
instead of kNameSpaceID_Unkown. Also, needed to fix no-namespace case in
nsRDFXULBuilder.cpp.
David, please can you verify this bug fix or provide a testcase to verify it.
I've tried the following file but we don't have the right environment to catch
any assertion:
<HTML>
<HEAD>
<TITLE>MyPage</TITLE>
</HEAD>
<BODY>
<SCRIPT TYPE="text/javascript">
// object reference to HTML Body element
var oBody = document.firstChild.childNodes.item(1);
oBody.setAttribute("myproperty", "foo");
document.write(oBody.getAttribute("myproperty"));
</SCRIPT>
</BODY>
</HTML>
Thanks!
Assignee | ||
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Assignee | ||
Comment 4•26 years ago
|
||
Marked verified: tons of XUL code is using this.
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•