window.opener

JavaScript1.1+, JScript1.0+ Nav3+, IE3+, Opera3+ Syntax

							window.opener
window.opener.method
							window.opener.property
						

Description

The opener property of the Window object corresponds to the window that opens the window from which the property was accessed. When accessed by a child window, it returns the parent window. With this property, you can then invoke methods and access properties of the Window object on the "opener" window. This property can also be set in scripts that allow the browser to clean up the reference to the parent window if it is closed before the child window. Most browsers have limits on the number of open windows they can have, and, by cleaning up these closed windows, you are able to regain the ability to ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.