CustomEvent

  • Revision slug: DOM/Event/CustomEvent
  • Revision title: CustomEvent
  • Revision id: 22783
  • Created:
  • Creator: Sephr
  • Is current revision? No
  • Comment 141 words added, 1 words removed

Revision Content

{{ gecko_minversion_header("6.0") }}

The DOM CustomEvent are events initialized by an application for any purpose. It's represented by the {{ interface("nsIDOMCustomEvent") }} interface, which extends the {{ interface("nsIDOMEvent") }} interface.

Method overview

void initCustomEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any detail);

Attributes

Attribute Type Description
detail any (are ES Harmony types appropriate?) The data passed when initializing the event.

Methods

initCustomEvent()

Initializes the event in a manner analogous to the similarly-named method in the DOM Events interfaces.

void initCustomEvent(
  in DOMString typeArg,
  in boolean canBubbleArg,
  in boolean cancelableArg,
  in any detailArg
);
Parameters
typeArg
Missing Description
canBubbleArg
Missing Description
cancelableArg
Missing Description
detailArg
The data passed when initializing the event.

Specification

  • {{ spec("http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#interface-CustomEvent","DOM Level 3 Events : CustomEvent","WD") }}

Revision Source

<p>{{ gecko_minversion_header("6.0") }}</p>
<p>The DOM <code>CustomEvent</code> are events initialized by an application for any purpose. It's represented by the {{ interface("nsIDOMCustomEvent") }} interface, which extends the {{ interface("nsIDOMEvent") }} interface.</p>
<h2 name="Method_overview">Method overview</h2>
<table class="standard-table"> <tbody> <tr> <td><code>void <a href="#initCustomEvent()">initCustomEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in any detail);</code></td> </tr> </tbody>
</table>
<h2 name="Attributes">Attributes</h2>
<table class="standard-table"> <tbody> <tr> <td class="header">Attribute</td> <td class="header">Type</td> <td class="header">Description</td> </tr> <tr> <td><code>detail</code></td> <td><code>any (are ES Harmony types appropriate?)</code></td> <td>The data passed when initializing the event.</td> </tr> </tbody>
</table>
<h2 name="Methods">Methods</h2>
<h3 name="initCustomEvent()">initCustomEvent()</h3>
<p>Initializes the event in a manner analogous to the similarly-named method in the DOM Events interfaces.</p>
<pre class="eval">void initCustomEvent(
  in DOMString typeArg,
  in boolean canBubbleArg,
  in boolean cancelableArg,
  in any detailArg
);
</pre>
<h6 name="Parameters">Parameters</h6>
<dl> <dt><code>typeArg</code></dt> <dd>Missing Description</dd> <dt><code>canBubbleArg</code></dt> <dd>Missing Description</dd> <dt><code>cancelableArg</code></dt> <dd>Missing Description</dd> <dt><code>detailArg</code></dt> <dd>The data passed when initializing the event.</dd>
</dl>
<h2>Specification</h2>
<ul> <li>{{ spec("http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#interface-CustomEvent","DOM Level 3 Events : CustomEvent","WD") }}</li>
</ul>
Revert to this revision