DOM

DOM

Source
  1. Let capture be the result of flattening options.

  2. Let once and passive be false.

  3. Let signal be null.

  4. If options is a dictionary, then:

  5. Return capture, passive, once, and signal.

EventTarget/EventTarget

In all current engines.

Firefox59+Safari14+Chrome64+ Opera51+Edge79+ Edge (Legacy)NoneIENone Firefox for Android59+iOS Safari14+Chrome for Android64+Android WebView64+Samsung Internet9.0+Opera Mobile47+ Node.js15.0.0+

The new EventTarget() constructor steps are to do nothing.

Because of the defaults stated elsewhere, the returned EventTarget's get the parent algorithm will return null, and it will have no activation behavior, legacy-pre-activation behavior, or legacy-canceled-activation behavior.

In the future we could allow custom get the parent algorithms. Let us know
if this would be useful for your programs. For now, all author-created EventTargets do not
participate in a tree structure.

To add an event listener, given an EventTarget object eventTarget and an event listener listener, run these steps:

The add an event listener concept exists to ensure event handlers use
the same code path. [HTML]

EventTarget/addEventListener

In all current engines.

Firefox1+Safari1+Chrome1+ Opera7+Edge79+ Edge (Legacy)12+IE9+ Firefox for Android4+iOS Safari1+Chrome for Android18+Android WebView1+Samsung Internet1.0+Opera Mobile10.1+ Node.js14.5.0+

The addEventListener(type, callback, options) method steps are:

To , given an EventTarget object eventTarget and an event listener listener, run these steps:



Read Next page

Report Page