event.cancelBubble

  • Revision slug: DOM/event.cancelBubble
  • Revision title: event.cancelBubble
  • Revision id: 18973
  • Created:
  • Creator: Nickolay
  • Is current revision? No
  • Comment

Revision Content

{{ DomRef() }}

Summary

{{ Deprecated_header() }} Indicates if event bubbling for this event has been canceled or not.

Syntax

event.cancelBubble = bool
bool = event.cancelBubble

bool is the boolean value of true or false.

Notes

cancelBubble is set to false by default. This allows the event to bubble up the DOM, if it is a bubbleable event. Setting this property to true stops the event from bubbling up the DOM. Not all events are allowed to bubble up the DOM.

Use event.stopPropagation() instead of this non-standard method.

{{ languages( { "pl": "pl/DOM/event.cancelBubble" } ) }}

Revision Source

<p>
{{ DomRef() }}
</p>
<h3 name="Summary"> Summary </h3>
<p>{{ Deprecated_header() }}
Indicates if event bubbling for this event has been canceled or not.
</p>
<h3 name="Syntax"> Syntax </h3>
<pre class="eval">event.cancelBubble = <i>bool</i>
<i>bool</i> = event.cancelBubble
</pre>
<p><code>bool</code> is the boolean value of <code>true</code> or <code>false</code>.
</p>
<h3 name="Notes"> Notes </h3>
<p><code>cancelBubble</code> is set to <code>false</code> by default. This allows the event to bubble up the DOM, if it is a bubbleable event. Setting this property to <code>true</code> stops the event from bubbling up the DOM. Not all events are allowed to bubble up the DOM.
</p><p>Use <a href="en/DOM/event.stopPropagation">event.stopPropagation()</a> instead of this non-standard method.
</p>{{ languages( { "pl": "pl/DOM/event.cancelBubble" } ) }}
Revert to this revision