Closed Bug 202955 Opened 20 years ago Closed 20 years ago
.close() in <frameset onload> does NOT close browser
Assignee: rogerl → dom_bugs
QA Contact: pschwartau → ashishbhatt
I think this is by design. See bug 32571, "window.close() can close windows it doesn't own". That was fixed on 2002-12-04. As a result of that fix, there is a new user preference: pref("dom.allow_scripts_to_close_windows", false); Unless set to true, window.close() and self.close() will not work unless the same script used window.open() to open the window. Note: the same-origin policy of the Security component already prevented a script from closing a window it doesn't own; this stops a script from closing a human-opened window. I hope I have this right; I'll let others comment - cc'ing Mitch.
Summary: window.close() does NOT close the browser on <body onload> → window.close() in <frameset onload> does NOT close browser
*** This bug has been marked as a duplicate of 190515 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.