Closed
Bug 1217
Opened 26 years ago
Closed 26 years ago
Element.replaceChild(old,new); doesn't work
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
VERIFIED
INVALID
M4
People
(Reporter: angus, Assigned: vidur)
References
Details
Here's my test case:
<html>
<head>
<title>replaceChild Test</title>
<script>
function setStatus(newText) {
var status = document.getElementById('status');
var newStatusMessage = document.createTextNode(newText);
status.replaceChild(status.firstChild, newStatusMessage);
}
</script>
</head>
<body onload="setStatus('done loading.');">
<span id="status">Initializing Test . . . .</span>
</span>
</body>
</html>
Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Comment 2•26 years ago
|
||
per leger, assigning QA contacts to all open bugs without QA contacts according
to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser
Assignee | ||
Updated•26 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → INVALID
Assignee | ||
Comment 3•26 years ago
|
||
The parameters to replaceChild are in the wrong order. If you change it to:
status.replaceChild(newStatusMessage, status.firstChild)
things should work fine. Of course, it would be nice if we displayed an error
message. Unfortunately, the DOM spec says that this should fail silently.
Updated•9 years ago
|
Depends on: SM240-RELNOTE
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
•