I am trying to override window.close() Method in JavaScript. Here is my code:
(function () { var _close = window.close; window.close = function () { window.opener.alert("test"); _close(); }; })(); I am trying to bind this code to new window and execute the inner code when the new window is closed. Is is possible to override window.close like this?