closed property (Internet Explorer)

Switch View :
ScriptFree
closed property

[This documentation is preliminary and is subject to change.]

Retrieves whether the referenced window is closed.

Syntax

JavaScript

p = object.closed

Property values

Type: Boolean

VARIANT_FALSE (false)

Default. Window is open.

VARIANT_TRUE (true)

Window is closed.

 

 

Build date: 2/14/2012

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?