Answer the question
In order to leave comments, you need to log in
How to assign a window close event handler?
I open a new window:
window.popup = window.open('http://some.url', 'popup', 'width=572,height=570');
Answer the question
In order to leave comments, you need to log in
Try to do so, he recently dealt with this topic.
var tab = window.open('', '_blank');
tab.location;
tab.document.write('<body"> try to close </body>');
tab.window.onbeforeunload = function () {
console.log ("Tab closed");
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question