mozilla

Revision 323897 of DOMWindowClose

  • Revision slug: Mozilla_event_reference/DOMWindowClose
  • Revision title: DOMWindowClose
  • Revision id: 323897
  • Created:
  • Creator: Markh
  • Is current revision? No
  • Comment Clarify the event is sent before the close and may be cancelled.

Revision Content

The DOMWindowClose event is executed as a Window is about to be closed via window.close().  If the event is cancelled (evt.preventDefault()), the window close is cancelled.

General info

Specification
Addons specific
Interface
Event
Bubbles
Yes
Cancelable
Yes
Target
window, browser
Default Action
None

Properties

{{OpenEventProperties()}}{{CloseEventProperties()}}

Revision Source

<p>The <code>DOMWindowClose</code> event is executed as a Window is about to be closed via <code>window.close()</code>.&nbsp; If the event is cancelled (<code>evt.preventDefault()</code>), the window close is cancelled.</p>
<h2 id="General_info">General info</h2>
<dl>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Specification</dt>
  <dd style="margin: 0 0 0 120px;">
    <i>Addons specific</i></dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Interface</dt>
  <dd style="margin: 0 0 0 120px;">
    Event</dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Bubbles</dt>
  <dd style="margin: 0 0 0 120px;">
    Yes</dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Cancelable</dt>
  <dd style="margin: 0 0 0 120px;">
    Yes</dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Target</dt>
  <dd style="margin: 0 0 0 120px;">
    window, <a href="https://developer.mozilla.org/en-US/docs/XUL/browser">browser</a></dd>
  <dt style="clear: left; float: left; text-align: right; width: 120px;">
    Default Action</dt>
  <dd style="margin: 0 0 0 120px;">
    None</dd>
</dl>
<h2 id="Properties">Properties</h2>
<p>{{OpenEventProperties()}}{{CloseEventProperties()}}</p>
Revert to this revision