@rescript/webapi 0.1.0-experimental-a0d5168 → 0.1.0-experimental-fb395c3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/package.json +1 -1
  2. package/src/CSSFontLoadingAPI/FontFaceSet.res +3 -79
  3. package/src/CanvasAPI/OffscreenCanvas.res +3 -79
  4. package/src/ChannelMessagingAPI/MessagePort.res +3 -81
  5. package/src/ClipboardAPI/Clipboard.res +3 -80
  6. package/src/DOMAPI/Animation.res +3 -80
  7. package/src/DOMAPI/CharacterData.res +68 -231
  8. package/src/DOMAPI/Comment.res +4 -271
  9. package/src/DOMAPI/Document.res +4 -178
  10. package/src/DOMAPI/DocumentFragment.res +58 -220
  11. package/src/DOMAPI/Element.res +313 -477
  12. package/src/DOMAPI/HTMLAnchorElement.res +3 -691
  13. package/src/DOMAPI/HTMLAreaElement.res +3 -685
  14. package/src/DOMAPI/HTMLAudioElement.res +3 -748
  15. package/src/DOMAPI/HTMLBRElement.res +3 -684
  16. package/src/DOMAPI/HTMLBaseElement.res +3 -685
  17. package/src/DOMAPI/HTMLBodyElement.res +3 -685
  18. package/src/DOMAPI/HTMLButtonElement.res +3 -691
  19. package/src/DOMAPI/HTMLCanvasElement.res +3 -691
  20. package/src/DOMAPI/HTMLDListElement.res +3 -688
  21. package/src/DOMAPI/HTMLDataElement.res +3 -685
  22. package/src/DOMAPI/HTMLDataListElement.res +3 -695
  23. package/src/DOMAPI/HTMLDialogElement.res +3 -691
  24. package/src/DOMAPI/HTMLDivElement.res +3 -684
  25. package/src/DOMAPI/HTMLElement.res +40 -666
  26. package/src/DOMAPI/HTMLEmbedElement.res +3 -688
  27. package/src/DOMAPI/HTMLFieldSetElement.res +3 -695
  28. package/src/DOMAPI/HTMLFormElement.res +3 -685
  29. package/src/DOMAPI/HTMLFrameSetElement.res +3 -695
  30. package/src/DOMAPI/HTMLHRElement.res +3 -684
  31. package/src/DOMAPI/HTMLHeadElement.res +3 -685
  32. package/src/DOMAPI/HTMLHeadingElement.res +3 -691
  33. package/src/DOMAPI/HTMLHtmlElement.res +3 -685
  34. package/src/DOMAPI/HTMLIFrameElement.res +3 -691
  35. package/src/DOMAPI/HTMLImageElement.res +3 -688
  36. package/src/DOMAPI/HTMLInputElement.res +3 -688
  37. package/src/DOMAPI/HTMLLIElement.res +3 -684
  38. package/src/DOMAPI/HTMLLabelElement.res +3 -688
  39. package/src/DOMAPI/HTMLLegendElement.res +3 -691
  40. package/src/DOMAPI/HTMLLinkElement.res +3 -685
  41. package/src/DOMAPI/HTMLMapElement.res +3 -684
  42. package/src/DOMAPI/HTMLMediaElement.res +49 -722
  43. package/src/DOMAPI/HTMLMenuElement.res +3 -685
  44. package/src/DOMAPI/HTMLMetaElement.res +3 -685
  45. package/src/DOMAPI/HTMLMeterElement.res +3 -688
  46. package/src/DOMAPI/HTMLModElement.res +3 -684
  47. package/src/DOMAPI/HTMLOListElement.res +3 -688
  48. package/src/DOMAPI/HTMLObjectElement.res +3 -691
  49. package/src/DOMAPI/HTMLOptGroupElement.res +3 -695
  50. package/src/DOMAPI/HTMLOptionElement.res +3 -691
  51. package/src/DOMAPI/HTMLOutputElement.res +3 -691
  52. package/src/DOMAPI/HTMLParagraphElement.res +3 -699
  53. package/src/DOMAPI/HTMLPictureElement.res +3 -691
  54. package/src/DOMAPI/HTMLPreElement.res +3 -684
  55. package/src/DOMAPI/HTMLProgressElement.res +3 -695
  56. package/src/DOMAPI/HTMLQuoteElement.res +3 -688
  57. package/src/DOMAPI/HTMLScriptElement.res +3 -691
  58. package/src/DOMAPI/HTMLSelectElement.res +4 -692
  59. package/src/DOMAPI/HTMLSlotElement.res +3 -685
  60. package/src/DOMAPI/HTMLSourceElement.res +3 -691
  61. package/src/DOMAPI/HTMLSpanElement.res +3 -685
  62. package/src/DOMAPI/HTMLStyleElement.res +3 -688
  63. package/src/DOMAPI/HTMLTableCaptionElement.res +3 -712
  64. package/src/DOMAPI/HTMLTableCellElement.res +3 -699
  65. package/src/DOMAPI/HTMLTableElement.res +3 -688
  66. package/src/DOMAPI/HTMLTableRowElement.res +3 -695
  67. package/src/DOMAPI/HTMLTableSectionElement.res +3 -712
  68. package/src/DOMAPI/HTMLTemplateElement.res +3 -695
  69. package/src/DOMAPI/HTMLTextAreaElement.res +3 -695
  70. package/src/DOMAPI/HTMLTimeElement.res +3 -685
  71. package/src/DOMAPI/HTMLTitleElement.res +3 -688
  72. package/src/DOMAPI/HTMLTrackElement.res +3 -688
  73. package/src/DOMAPI/HTMLUListElement.res +3 -688
  74. package/src/DOMAPI/HTMLVideoElement.res +3 -748
  75. package/src/DOMAPI/MediaQueryList.res +3 -80
  76. package/src/DOMAPI/Node.res +59 -124
  77. package/src/DOMAPI/SVGGraphicsElement.res +4 -660
  78. package/src/DOMAPI/ScreenOrientation.res +3 -79
  79. package/src/DOMAPI/ShadowRoot.res +4 -255
  80. package/src/DOMAPI/Text.res +4 -271
  81. package/src/DOMAPI/TextTrackList.res +3 -79
  82. package/src/DOMAPI/Window.res +4 -80
  83. package/src/EncryptedMediaExtensionsAPI/MediaKeySession.res +3 -80
  84. package/src/EventAPI/AbortSignal.res +3 -80
  85. package/src/EventAPI/Event.res +28 -16
  86. package/src/EventAPI/EventTarget.res +51 -39
  87. package/src/FileAPI/Blob.res +26 -15
  88. package/src/FileAPI/File.res +4 -31
  89. package/src/IndexedDBAPI/IDBDatabase.res +3 -79
  90. package/src/IndexedDBAPI/IDBTransaction.res +3 -80
  91. package/src/MediaCaptureAndStreamsAPI/MediaDevices.res +3 -79
  92. package/src/MediaCaptureAndStreamsAPI/MediaStream.res +3 -80
  93. package/src/MediaCaptureAndStreamsAPI/MediaStreamTrack.res +3 -81
  94. package/src/NotificationAPI/Notification.res +3 -80
  95. package/src/PerformanceAPI/Performance.res +3 -79
  96. package/src/RemotePlaybackAPI/RemotePlayback.res +3 -80
  97. package/src/ScreenWakeLockAPI/WakeLockSentinel.res +3 -79
  98. package/src/ServiceWorkerAPI/ServiceWorker.res +3 -79
  99. package/src/ServiceWorkerAPI/ServiceWorkerContainer.res +3 -79
  100. package/src/ServiceWorkerAPI/ServiceWorkerRegistration.res +3 -79
  101. package/src/WebAudioAPI/AnalyserNode.res +4 -148
  102. package/src/WebAudioAPI/AudioBufferSourceNode.res +4 -162
  103. package/src/WebAudioAPI/AudioContext.res +4 -212
  104. package/src/WebAudioAPI/AudioNode.res +39 -113
  105. package/src/WebAudioAPI/AudioProcessingEvent.res +4 -30
  106. package/src/WebAudioAPI/AudioScheduledSourceNode.res +20 -162
  107. package/src/WebAudioAPI/AudioWorkletNode.res +4 -149
  108. package/src/WebAudioAPI/BaseAudioContext.res +85 -155
  109. package/src/WebAudioAPI/BiquadFilterNode.res +4 -149
  110. package/src/WebAudioAPI/ChannelMergerNode.res +4 -149
  111. package/src/WebAudioAPI/ChannelSplitterNode.res +4 -149
  112. package/src/WebAudioAPI/ConstantSourceNode.res +4 -162
  113. package/src/WebAudioAPI/ConvolverNode.res +4 -149
  114. package/src/WebAudioAPI/DelayNode.res +4 -143
  115. package/src/WebAudioAPI/DynamicsCompressorNode.res +4 -152
  116. package/src/WebAudioAPI/GainNode.res +4 -142
  117. package/src/WebAudioAPI/IIRFilterNode.res +4 -149
  118. package/src/WebAudioAPI/MediaElementAudioSourceNode.res +4 -158
  119. package/src/WebAudioAPI/MediaStreamAudioDestinationNode.res +4 -158
  120. package/src/WebAudioAPI/MediaStreamAudioSourceNode.res +4 -158
  121. package/src/WebAudioAPI/OfflineAudioCompletionEvent.res +4 -30
  122. package/src/WebAudioAPI/OfflineAudioContext.res +4 -214
  123. package/src/WebAudioAPI/OscillatorNode.res +4 -162
  124. package/src/WebAudioAPI/PannerNode.res +4 -143
  125. package/src/WebAudioAPI/StereoPannerNode.res +4 -149
  126. package/src/WebAudioAPI/WaveShaperNode.res +4 -149
  127. package/src/WebSocketsAPI/CloseEvent.res +4 -30
  128. package/src/WebSocketsAPI/WebSocket.res +3 -79
  129. package/src/WebSpeechAPI/SpeechSynthesis.res +3 -79
  130. package/src/WebSpeechAPI/SpeechSynthesisUtterance.res +4 -81
  131. package/src/WebStorageAPI/StorageEvent.res +4 -30
  132. package/src/WebVTTAPI/TextTrack.res +3 -79
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rescript/webapi",
3
- "version": "0.1.0-experimental-a0d5168",
3
+ "version": "0.1.0-experimental-fb395c3",
4
4
  "description": "Experimental successor to [rescript-webapi](https://github.com/TheSpyder/rescript-webapi)",
5
5
  "homepage": "https://rescript-lang.github.io/experimental-rescript-webapi/",
6
6
  "bugs": "https://github.com/rescript-lang/experimental-rescript-webapi/issues",
@@ -1,85 +1,9 @@
1
1
  open EventAPI
2
2
  open CSSFontLoadingAPI
3
3
 
4
- external asEventTarget: fontFaceSet => eventTarget = "%identity"
5
- /**
6
- Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
7
-
8
- The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
9
-
10
- When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
11
-
12
- When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
13
-
14
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
15
-
16
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
17
-
18
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
19
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
20
- */
21
- @send
22
- external addEventListener: (
23
- fontFaceSet,
24
- ~type_: eventType,
25
- ~callback: eventListener<'event>,
26
- ~options: addEventListenerOptions=?,
27
- ) => unit = "addEventListener"
28
-
29
- /**
30
- Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
31
-
32
- The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
33
-
34
- When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
35
-
36
- When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
37
-
38
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
39
-
40
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
41
-
42
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
43
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
44
- */
45
- @send
46
- external addEventListener2: (
47
- fontFaceSet,
48
- ~type_: eventType,
49
- ~callback: eventListener<'event>,
50
- ~options: bool=?,
51
- ) => unit = "addEventListener"
52
-
53
- /**
54
- Removes the event listener in target's event listener list with the same type, callback, and options.
55
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
56
- */
57
- @send
58
- external removeEventListener: (
59
- fontFaceSet,
60
- ~type_: eventType,
61
- ~callback: eventListener<'event>,
62
- ~options: eventListenerOptions=?,
63
- ) => unit = "removeEventListener"
64
-
65
- /**
66
- Removes the event listener in target's event listener list with the same type, callback, and options.
67
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
68
- */
69
- @send
70
- external removeEventListener2: (
71
- fontFaceSet,
72
- ~type_: eventType,
73
- ~callback: eventListener<'event>,
74
- ~options: bool=?,
75
- ) => unit = "removeEventListener"
76
-
77
- /**
78
- Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
79
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
80
- */
81
- @send
82
- external dispatchEvent: (fontFaceSet, event) => bool = "dispatchEvent"
4
+ include EventTarget.Impl({
5
+ type t = fontFaceSet
6
+ })
83
7
 
84
8
  /**
85
9
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/add)
@@ -9,85 +9,9 @@ open FileAPI
9
9
  @new
10
10
  external make: (~width: int, ~height: int) => offscreenCanvas = "OffscreenCanvas"
11
11
 
12
- external asEventTarget: offscreenCanvas => eventTarget = "%identity"
13
- /**
14
- Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
15
-
16
- The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
17
-
18
- When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
19
-
20
- When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
21
-
22
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
23
-
24
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
25
-
26
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
27
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
28
- */
29
- @send
30
- external addEventListener: (
31
- offscreenCanvas,
32
- ~type_: eventType,
33
- ~callback: eventListener<'event>,
34
- ~options: addEventListenerOptions=?,
35
- ) => unit = "addEventListener"
36
-
37
- /**
38
- Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
39
-
40
- The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
41
-
42
- When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
43
-
44
- When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
45
-
46
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
47
-
48
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
49
-
50
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
51
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
52
- */
53
- @send
54
- external addEventListener2: (
55
- offscreenCanvas,
56
- ~type_: eventType,
57
- ~callback: eventListener<'event>,
58
- ~options: bool=?,
59
- ) => unit = "addEventListener"
60
-
61
- /**
62
- Removes the event listener in target's event listener list with the same type, callback, and options.
63
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
64
- */
65
- @send
66
- external removeEventListener: (
67
- offscreenCanvas,
68
- ~type_: eventType,
69
- ~callback: eventListener<'event>,
70
- ~options: eventListenerOptions=?,
71
- ) => unit = "removeEventListener"
72
-
73
- /**
74
- Removes the event listener in target's event listener list with the same type, callback, and options.
75
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
76
- */
77
- @send
78
- external removeEventListener2: (
79
- offscreenCanvas,
80
- ~type_: eventType,
81
- ~callback: eventListener<'event>,
82
- ~options: bool=?,
83
- ) => unit = "removeEventListener"
84
-
85
- /**
86
- Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
87
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
88
- */
89
- @send
90
- external dispatchEvent: (offscreenCanvas, event) => bool = "dispatchEvent"
12
+ include EventTarget.Impl({
13
+ type t = offscreenCanvas
14
+ })
91
15
 
92
16
  /**
93
17
  Returns an object that exposes an API for drawing on the OffscreenCanvas object. contextId specifies the desired API: "2d", "bitmaprenderer", "webgl", or "webgl2". options is handled by that API.
@@ -1,86 +1,8 @@
1
- open EventAPI
2
1
  open ChannelMessagingAPI
3
- open Prelude
4
2
 
5
- external asEventTarget: messagePort => eventTarget = "%identity"
6
- /**
7
- Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
8
-
9
- The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
10
-
11
- When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
12
-
13
- When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
14
-
15
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
16
-
17
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
18
-
19
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
20
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
21
- */
22
- @send
23
- external addEventListener: (
24
- messagePort,
25
- ~type_: eventType,
26
- ~callback: eventListener<'event>,
27
- ~options: addEventListenerOptions=?,
28
- ) => unit = "addEventListener"
29
-
30
- /**
31
- Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
32
-
33
- The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
34
-
35
- When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
36
-
37
- When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
38
-
39
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
40
-
41
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
42
-
43
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
44
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
45
- */
46
- @send
47
- external addEventListener2: (
48
- messagePort,
49
- ~type_: eventType,
50
- ~callback: eventListener<'event>,
51
- ~options: bool=?,
52
- ) => unit = "addEventListener"
53
-
54
- /**
55
- Removes the event listener in target's event listener list with the same type, callback, and options.
56
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
57
- */
58
- @send
59
- external removeEventListener: (
60
- messagePort,
61
- ~type_: eventType,
62
- ~callback: eventListener<'event>,
63
- ~options: eventListenerOptions=?,
64
- ) => unit = "removeEventListener"
65
-
66
- /**
67
- Removes the event listener in target's event listener list with the same type, callback, and options.
68
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
69
- */
70
- @send
71
- external removeEventListener2: (
72
- messagePort,
73
- ~type_: eventType,
74
- ~callback: eventListener<'event>,
75
- ~options: bool=?,
76
- ) => unit = "removeEventListener"
77
-
78
- /**
79
- Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
80
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
81
- */
82
- @send
83
- external dispatchEvent: (messagePort, event) => bool = "dispatchEvent"
3
+ include EventTarget.Impl({
4
+ type t = messagePort
5
+ })
84
6
 
85
7
  /**
86
8
  Posts a message through the channel. Objects listed in transfer are transferred, not just cloned, meaning that they are no longer usable on the sending side.
@@ -1,85 +1,8 @@
1
- open EventAPI
2
1
  open ClipboardAPI
3
2
 
4
- external asEventTarget: clipboard => eventTarget = "%identity"
5
- /**
6
- Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
7
-
8
- The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
9
-
10
- When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
11
-
12
- When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
13
-
14
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
15
-
16
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
17
-
18
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
19
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
20
- */
21
- @send
22
- external addEventListener: (
23
- clipboard,
24
- ~type_: eventType,
25
- ~callback: eventListener<'event>,
26
- ~options: addEventListenerOptions=?,
27
- ) => unit = "addEventListener"
28
-
29
- /**
30
- Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
31
-
32
- The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
33
-
34
- When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
35
-
36
- When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
37
-
38
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
39
-
40
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
41
-
42
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
43
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
44
- */
45
- @send
46
- external addEventListener2: (
47
- clipboard,
48
- ~type_: eventType,
49
- ~callback: eventListener<'event>,
50
- ~options: bool=?,
51
- ) => unit = "addEventListener"
52
-
53
- /**
54
- Removes the event listener in target's event listener list with the same type, callback, and options.
55
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
56
- */
57
- @send
58
- external removeEventListener: (
59
- clipboard,
60
- ~type_: eventType,
61
- ~callback: eventListener<'event>,
62
- ~options: eventListenerOptions=?,
63
- ) => unit = "removeEventListener"
64
-
65
- /**
66
- Removes the event listener in target's event listener list with the same type, callback, and options.
67
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
68
- */
69
- @send
70
- external removeEventListener2: (
71
- clipboard,
72
- ~type_: eventType,
73
- ~callback: eventListener<'event>,
74
- ~options: bool=?,
75
- ) => unit = "removeEventListener"
76
-
77
- /**
78
- Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
79
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
80
- */
81
- @send
82
- external dispatchEvent: (clipboard, event) => bool = "dispatchEvent"
3
+ include EventTarget.Impl({
4
+ type t = clipboard
5
+ })
83
6
 
84
7
  /**
85
8
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Clipboard/read)
@@ -1,4 +1,3 @@
1
- open EventAPI
2
1
  open DOMAPI
3
2
 
4
3
  /**
@@ -8,85 +7,9 @@ open DOMAPI
8
7
  external make: (~effect: animationEffect=?, ~timeline: animationTimeline=?) => animation =
9
8
  "Animation"
10
9
 
11
- external asEventTarget: animation => eventTarget = "%identity"
12
- /**
13
- Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
14
-
15
- The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
16
-
17
- When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
18
-
19
- When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
20
-
21
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
22
-
23
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
24
-
25
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
26
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
27
- */
28
- @send
29
- external addEventListener: (
30
- animation,
31
- ~type_: eventType,
32
- ~callback: eventListener<'event>,
33
- ~options: addEventListenerOptions=?,
34
- ) => unit = "addEventListener"
35
-
36
- /**
37
- Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
38
-
39
- The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
40
-
41
- When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
42
-
43
- When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
44
-
45
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
46
-
47
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
48
-
49
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
50
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
51
- */
52
- @send
53
- external addEventListener2: (
54
- animation,
55
- ~type_: eventType,
56
- ~callback: eventListener<'event>,
57
- ~options: bool=?,
58
- ) => unit = "addEventListener"
59
-
60
- /**
61
- Removes the event listener in target's event listener list with the same type, callback, and options.
62
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
63
- */
64
- @send
65
- external removeEventListener: (
66
- animation,
67
- ~type_: eventType,
68
- ~callback: eventListener<'event>,
69
- ~options: eventListenerOptions=?,
70
- ) => unit = "removeEventListener"
71
-
72
- /**
73
- Removes the event listener in target's event listener list with the same type, callback, and options.
74
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
75
- */
76
- @send
77
- external removeEventListener2: (
78
- animation,
79
- ~type_: eventType,
80
- ~callback: eventListener<'event>,
81
- ~options: bool=?,
82
- ) => unit = "removeEventListener"
83
-
84
- /**
85
- Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
86
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
87
- */
88
- @send
89
- external dispatchEvent: (animation, event) => bool = "dispatchEvent"
10
+ include EventTarget.Impl({
11
+ type t = animation
12
+ })
90
13
 
91
14
  /**
92
15
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Animation/cancel)