Event.idl 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #import <DOM/EventTarget.idl>
  2. #import <HighResolutionTime/DOMHighResTimeStamp.idl>
  3. // https://dom.spec.whatwg.org/#event
  4. [Exposed=*]
  5. interface Event {
  6. constructor(DOMString type, optional EventInit eventInitDict = {});
  7. readonly attribute DOMString type;
  8. readonly attribute EventTarget? target;
  9. readonly attribute EventTarget? srcElement; // legacy
  10. readonly attribute EventTarget? currentTarget;
  11. sequence<EventTarget> composedPath();
  12. const unsigned short NONE = 0;
  13. const unsigned short CAPTURING_PHASE = 1;
  14. const unsigned short AT_TARGET = 2;
  15. const unsigned short BUBBLING_PHASE = 3;
  16. readonly attribute unsigned short eventPhase;
  17. undefined stopPropagation();
  18. attribute boolean cancelBubble; // legacy alias of .stopPropagation()
  19. undefined stopImmediatePropagation();
  20. readonly attribute boolean bubbles;
  21. readonly attribute boolean cancelable;
  22. attribute boolean returnValue; // legacy
  23. undefined preventDefault();
  24. readonly attribute boolean defaultPrevented;
  25. readonly attribute boolean composed;
  26. [LegacyUnforgeable] readonly attribute boolean isTrusted;
  27. readonly attribute DOMHighResTimeStamp timeStamp;
  28. undefined initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false); // legacy
  29. };
  30. dictionary EventInit {
  31. boolean bubbles = false;
  32. boolean cancelable = false;
  33. boolean composed = false;
  34. };