Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the Document</title> </head> <body> <script> let newWindow = open('/', 'example', 'width=500,height=500'); newWindow.onload = function() { newWindow.close(); alert(newWindow.closed); // true }; </script> </body> </html>