Window.opener

  • Revision slug: DOM/window.opener
  • Revision title: window.opener
  • Revision id: 30311
  • Created:
  • Creator: my49cn
  • Is current revision? No
  • Comment no wording changes; page display name changed to 'window.opener'

Revision Content

{{ DomRef() }}

Summary

Returns a reference to the window that opened this current window.

Syntax

objRef = window.opener 

Example

 if window.opener != indexWin {
     referToTop(window.opener);
 }

Notes

When a window is opened from another window, it maintains a reference to that first window as window.opener. If the current window has no opener, this method returns NULL.

Specification

{{ DOM0() }}

{{ languages( { "fr": "fr/DOM/window.opener", "ja": "ja/DOM/window.opener", "pl": "pl/DOM/window.opener" } ) }}

Revision Source

<p>
{{ DomRef() }}
</p>
<h3 name="Summary">Summary</h3>
<p>Returns a reference to the window that opened this current window. </p>
<h3 name="Syntax">Syntax </h3>
<pre class="eval"><i>objRef</i> = window.opener 
</pre>
<h3 name="Example">Example</h3>
<pre> if window.opener != indexWin {
     referToTop(window.opener);
 }
</pre><h3 name="Notes">Notes </h3>
<p>When a window is opened from another window, it maintains a reference to that first window as <b>window.opener</b>. If the current window has no opener, this method returns NULL. </p>
<h3 name="Specification">Specification </h3>
<p>{{ DOM0() }}
</p>
<div class="noinclude">
</div>
{{ languages( { "fr": "fr/DOM/window.opener", "ja": "ja/DOM/window.opener", "pl": "pl/DOM/window.opener" } ) }}
Revert to this revision