RESOLVED WONTFIX14078
REGRESSION: document.appendChild(anIFrame) throws an exception
https://bugs.webkit.org/show_bug.cgi?id=14078
Summary REGRESSION: document.appendChild(anIFrame) throws an exception
Bertrand Le Roy
Reported 2007-06-11 17:01:56 PDT
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
Mark Rowe (bdash)
Comment 1 2007-06-12 17:47:12 PDT
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
Comment 2 2007-06-12 18:02:35 PDT
(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)
Comment 3 2007-06-12 18:08:33 PDT
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.
Note You need to log in before you can comment on or make changes to this bug.