RESOLVED DUPLICATE of bug 8961 14599
document.write() inside an <iframe src> does not work
https://bugs.webkit.org/show_bug.cgi?id=14599
Summary document.write() inside an <iframe src> does not work
Sridhar Gurivireddy
Reported 2007-07-12 17:03:26 PDT
Document.write() inside an iframe src should write to the <iframe>. Safari does not do anything. e.g code ####### <frameset id="frameset" border="1" cols="50%,50%" style='border: solid 1px;'> <frame name="frame2" src="about:blank"> <frame name="frame1" src="javascript: try { document.write('whatever'); } catch(e) { window.alert(e.description); } "> </frameset> This works well in other browsers
Attachments
test case (328 bytes, text/html)
2007-07-12 22:13 PDT, Alexey Proskuryakov
no flags
Testcase.. 2 files (370 bytes, application/octet-stream)
2007-07-26 21:55 PDT, Justin Haygood
no flags
Alexey Proskuryakov
Comment 1 2007-07-12 22:13:10 PDT
Confirmed with r24241 on Mac OS X.
Alexey Proskuryakov
Comment 2 2007-07-12 22:13:58 PDT
Created attachment 15496 [details] test case
David Kilzer (:ddkilzer)
Comment 3 2007-07-14 14:28:42 PDT
Not a regression as the reduction behaves the same way with Safari 2.0.4 (419.3) with original WebKit on Mac OS X 10.4.10 (2R218). Tested with a local debug build of WebKit r24285 with Safari 3.0 (522.12) on 10.410.
David Kilzer (:ddkilzer)
Comment 4 2007-07-14 14:58:19 PDT
(In reply to comment #2) > Created an attachment (id=15496) [edit] > test case FWIW, this test case caused a crash in Firefox 2.0.0.4: https://bugzilla.mozilla.org/show_bug.cgi?id=388181
Justin Haygood
Comment 5 2007-07-26 21:55:46 PDT
Created attachment 15695 [details] Testcase.. 2 files 2 file testcase in ZIP.... test.html opens up an iframe which uses document.write. I believe the bug description is wrong, and the test case provide demonstrates a different bug? Can you really put framecontent inline with the mainpage? I've never seen that be done.
Sridhar Gurivireddy
Comment 6 2007-09-26 15:21:16 PDT
I beleive basically the bug here is that document.write() does not update the content until document.close() is called. javascript:document.write("sridhar") does not work in Safari, while javascript:document.write("sridhar");document.close(); works
Alexey Proskuryakov
Comment 7 2007-09-26 21:29:25 PDT
(In reply to comment #6) > I beleive basically the bug here is that document.write() does not update the > content until document.close() is called. This sounds like a duplicate of bug 8961.
Adam Barth
Comment 8 2010-08-13 20:23:23 PDT
Yep. My patch for Bug 8961 fixes this one too. *** This bug has been marked as a duplicate of bug 8961 ***
Note You need to log in before you can comment on or make changes to this bug.