RESOLVED FIXED 20661
JavaScript can close a window
https://bugs.webkit.org/show_bug.cgi?id=20661
Summary JavaScript can close a window
Berend-Jan Wever
Reported 2008-09-05 05:34:21 PDT
JavaScript can close a window, even if it was not opened through JavaScript. This is done by closing an IFRAME within the page: <BODY onload="go()"> <IFRAME name="target"></IFRAME> </BODY> <SCRIPT> function go() { oWin = window.open("about:blank", "target"); oWin.close(); } </SCRIPT>
Attachments
Mark Rowe (bdash)
Comment 1 2008-09-05 17:41:05 PDT
Alexey Proskuryakov
Comment 2 2009-01-29 14:36:37 PST
Adam Barth
Comment 3 2009-01-29 15:53:38 PST
ap, What was the reasoning behind that change? It seems like we want to match Firefox's behavior for window.close().
Brady Eidson
Comment 4 2009-01-29 16:56:06 PST
That change was actually made in an effort to match firefox.
Adam Barth
Comment 5 2009-01-29 18:11:12 PST
> That change was actually made in an effort to match firefox. Awesome. What else is left to do to match their policy?
Brady Eidson
Comment 6 2009-01-29 18:40:29 PST
I can't find a thorough documentation of Firefox's window.close() policy, but that change definitely brought us closer. And, in the process, fixed this bug!
Note You need to log in before you can comment on or make changes to this bug.