ElementEventListener_v2 Op

ElementEventListener

Add a custom event listener


<p>Adds a custom event listener to the HTML DOM element.</p>


Full Name
  • Ops.Html.Event.ElementEventListener_v2
Visibility
  • Core Op - Official cables op
License
  • MIT
AuthorgithubTest Patches


INPUT PORTS


Element (Object)

<p>The HTML DOM element to add the listener to</p>

Event Name (String)
Use Capture (Number:

<i>boolean</i>

)

<p>If multiple elements register an event listener, setting <code>Use Capture</code> will make sure the listener will be called before the regular (bubble) listeners. For more infos read here: <a href="https://javascript.info/bubbling-and-capturing">javascript.info/bubbling-and-capturing</a>.</p>

Prevent Default (Number:

<i>boolean</i>

)

<p>If set the default browser action for the event will not be executed. See <a href="https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault">developer.mozilla.org</a>.</p>

Stop Propagation (Number:

<i>boolean</i>

)

<p>Stops other elements’ event listeneres from getting called. See <a href="https://developer.mozilla.org/en-US/docs/Web/API/Event/stopPropagation">developer.mozilla.org</a>.</p>

OUTPUT PORTS


Event Trigger (Trigger)

<p>Trigger when the event occured</p>

Event Object (Object)

<p>The event object contains details about the event</p>


Patches using ElementEventListener_v2

  • Examples
  • Public
  • My Patches

Changelog


cloned op from Ops.Html.Event.CustomEventListeneruser avatarpandur - 2024-01-30 09:34