Created
April 16, 2015 16:41
-
-
Save GeoffCox/fc74ddc63e9b2dd63652 to your computer and use it in GitHub Desktop.
Close browser without prompting the user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This opens a window and sets the opener to the current window, then closes it. | |
var win = window.open("", "_top", "", true); | |
win.opener = window; | |
win.close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment