Skip to content

Instantly share code, notes, and snippets.

@annevk
Last active December 10, 2015 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save annevk/4475457 to your computer and use it in GitHub Desktop.
Save annevk/4475457 to your computer and use it in GitHub Desktop.
callback EventCallback = void (Event event);
dictionary EventOptions {
DOMString filter; // selector (only useful if target is an element)
boolean capture = false; // (!capture && !bubble) target
boolean bubble; // (capture && !bubble) capture + target
// (capture && bubble) capture + target + bubble
boolean ignoreBubbles = true; // ignore bubbles attribute
}
partial interface EventTarget {
Function on((DOMString or sequence<DOMString>) types, EventCallback callback, optional EventOptions options);
Function on(dictionary<EventCallback> typesAndCallbacks, optional EventOptions options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment