WebIDLpedia

EventTarget interface

Definition

DOM Standard defines EventTarget



[Exposed=*]
interface EventTarget {
  constructor();

  undefined addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options = {});
  undefined removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options = {});
  boolean dispatchEvent(Event event);
};

This interface is extended in the following specifications:

Consolidated IDL (across mixin and partials)


[Exposed=*]
interface EventTarget {
  constructor();

  undefined addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options = {});
  undefined removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options = {});
  boolean dispatchEvent(Event event);
  Observable when(DOMString type, optional ObservableEventListenerOptions options = {});
};

Methods and attributes that return objects implementing EventTarget

Referring IDL interfaces/dictionaries

Referring specifications