Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
DOM event
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Stopping events === While an event is travelling through event listeners, the event can be stopped with <code>event.stopPropagation()</code> or <code>event.stopImmediatePropagation()</code> * <code>event.stopPropagation()</code>: the event is stopped after all event listeners attached to the current event target in the current event phase are finished * <code>event.stopImmediatePropagation()</code>: the event is stopped immediately and no further event listeners are executed When an event is stopped it will no longer travel along the event path. Stopping an event does not cancel an event. ==== Legacy mechanisms to stop an event ==== * Set the <code>event.cancelBubble</code> to <code>true</code> (Internet Explorer) * Set the <code>event.returnValue</code> property to <code>false</code>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)