This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

closed

Summary

This read-only property indicates whether the referenced window is closed or not.

Property of dom/Windowdom/Window

Syntax

Note: This property is read-only.

var result = window.closed;

Return Value

Returns an object of type BooleanBoolean

Examples

var popupWindow = null;

function refreshPopupWindow() {
  if (popupWindow && !popupWindow.closed) {
    // popupWindow is open, refresh it
    popupWindow.location.reload(true);
  } else {
    // Open a new popup window
    popupWindow = window.open("popup.html","dataWindow");
  }
}

Syntax

Attributions