Closes the current window (or popup).
window.close(); // current window is closed.
close(); // current window is closed.
close.call(window); // current window is closed.
var popup = window.open();
close.call(popup); // popup is closed.
window.close = (function(close){ | |
return function(){ | |
return close.call( | |
this.open("about:blank", this.name = Math.random()) | |
); | |
} | |
})(window.close); |