closed property
Community Content
Juan Mendes
Use a try catch
If you're stuck in the situation described by Scott Trenda, you can use a try catch around the code that accesses window.opener to detect that it's closed.
Scott Trenda
Bug in iframe window object
When an iframe has been loaded and then removed from the parent document (whether through removeChild() or even through parentNode.innerHTML = ""), the iframe content window's closed property remains false. In all other browsers, it is set to true at the point where it has been removed from the parent document. Because this property is read-only, there is effectively no way to tell if the window within an external iframe has been closed or not. Is this a known bug, and are there any workarounds for it?