WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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
Add attachment
proposed patch, testcase, etc.
Mark Rowe (bdash)
Comment 1
2008-09-05 17:41:05 PDT
<
rdar://problem/6201382
>
Alexey Proskuryakov
Comment 2
2009-01-29 14:36:37 PST
See also: <
http://trac.webkit.org/projects/webkit/changeset/40371
>.
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.
Top of Page
Format For Printing
XML
Clone This Bug