Closed
Bug 685
Opened 27 years ago
Closed 24 years ago
document.documentElement.removeChild() doesn't work for IMGs
Categories
(Core :: Layout, defect, P2)
Tracking
()
VERIFIED
INVALID
People
(Reporter: angus, Assigned: vidur)
Details
Here's the test case I'm using:
<html>
<head>
<script>
function init() {
var foo = document.getElementsByTagName("IMG")[0];
alert(foo); // tells me I've got an HTMLImageElement
document.documentElement.removeChild(foo);
}
</script>
</head>
<body onload="init();">
<img src="http://my.netscape.com/mys/images/nnc_lockup.gif">
</body>
</html>
Assignee | ||
Comment 1•27 years ago
|
||
The documentElement is the <HTML> element, not the <BODY> element. I haven't got
document.body hooked up yet, but when I do, you should be able to do
document.body.removeChild(foo). In the meantime, do:
body = document.documentElement.childNodes[1];
body.removeChild(foo);
Updated•26 years ago
|
Component: Unknown → Layout
Comment 2•24 years ago
|
||
mid-air collision ? / bugzilla cleanup
Reopening (current State: resolved and no resolution)
Status: RESOLVED → REOPENED
Comment 3•24 years ago
|
||
not clear but marking invalid
Status: REOPENED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
Comment 4•24 years ago
|
||
The test case still doesn't do anything... But it doesn't look like valid DOM
to me (removeChild is shallow?) so I'm verifying invalid.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•