Event.idl 1.3 KB

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