Bug 14078
| Summary: | REGRESSION: document.appendChild(anIFrame) throws an exception | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Bertrand Le Roy <bleroy> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WONTFIX | ||
| Severity: | Normal | CC: | mrowe |
| Priority: | P2 | Keywords: | Regression |
| Version: | 523.x (Safari 3) | ||
| Hardware: | PC | ||
| OS: | Windows Server 2003 | ||
Bertrand Le Roy
Try this page. You should get two alerts, but in Safari 3 beta for Windows you get only the first one.
<html>
<head>
<script type="text/javascript">
function createFrame() {
frame = document.createElement('IFRAME');
frame.id = frame.name = "myFrame";
frame.src = "empty.htm";
alert("Creating iframe");
document.appendChild(frame);
alert("Created iframe");
}
</script>
</head>
<body onload="createFrame();">
</body>
</html>
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Mark Rowe (bdash)
Safari 3 throws a DOM exception:
HIERARCHY_REQUEST_ERR: DOM Exception 3
file:///Volumes/Data/Home/test.htm
Camino 1.5 and Firefox also appear to throw an exception, so I'm not convinced this is a bug in WebKit.
Bertrand Le Roy
(In reply to comment #1)
> Safari 3 throws a DOM exception:
> HIERARCHY_REQUEST_ERR: DOM Exception 3
> file:///Volumes/Data/Home/test.htm
> Camino 1.5 and Firefox also appear to throw an exception, so I'm not convinced
> this is a bug in WebKit.
Right, and the correct code would append under document.body, which works everywhere, but it's a regression in the sense that this worked in Safari 2.0.4.
Not so important as it's easily worked around though.
Mark Rowe (bdash)
Ah, thanks. I'll close this bug for now as the change is intentional, but it should be reopened if this change in behaviour causes any compatibility concerns.