@rescript/webapi 0.1.0-experimental-a0d5168 → 0.1.0-experimental-47c6b2c

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 (133) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/src/CSSFontLoadingAPI/FontFaceSet.res +3 -79
  4. package/src/CanvasAPI/OffscreenCanvas.res +3 -79
  5. package/src/ChannelMessagingAPI/MessagePort.res +3 -81
  6. package/src/ClipboardAPI/Clipboard.res +3 -80
  7. package/src/DOMAPI/Animation.res +3 -80
  8. package/src/DOMAPI/CharacterData.res +68 -231
  9. package/src/DOMAPI/Comment.res +4 -271
  10. package/src/DOMAPI/Document.res +4 -178
  11. package/src/DOMAPI/DocumentFragment.res +58 -220
  12. package/src/DOMAPI/Element.res +313 -477
  13. package/src/DOMAPI/HTMLAnchorElement.res +3 -691
  14. package/src/DOMAPI/HTMLAreaElement.res +3 -685
  15. package/src/DOMAPI/HTMLAudioElement.res +3 -748
  16. package/src/DOMAPI/HTMLBRElement.res +3 -684
  17. package/src/DOMAPI/HTMLBaseElement.res +3 -685
  18. package/src/DOMAPI/HTMLBodyElement.res +3 -685
  19. package/src/DOMAPI/HTMLButtonElement.res +3 -691
  20. package/src/DOMAPI/HTMLCanvasElement.res +3 -691
  21. package/src/DOMAPI/HTMLDListElement.res +3 -688
  22. package/src/DOMAPI/HTMLDataElement.res +3 -685
  23. package/src/DOMAPI/HTMLDataListElement.res +3 -695
  24. package/src/DOMAPI/HTMLDialogElement.res +3 -691
  25. package/src/DOMAPI/HTMLDivElement.res +3 -684
  26. package/src/DOMAPI/HTMLElement.res +40 -666
  27. package/src/DOMAPI/HTMLEmbedElement.res +3 -688
  28. package/src/DOMAPI/HTMLFieldSetElement.res +3 -695
  29. package/src/DOMAPI/HTMLFormElement.res +3 -685
  30. package/src/DOMAPI/HTMLFrameSetElement.res +3 -695
  31. package/src/DOMAPI/HTMLHRElement.res +3 -684
  32. package/src/DOMAPI/HTMLHeadElement.res +3 -685
  33. package/src/DOMAPI/HTMLHeadingElement.res +3 -691
  34. package/src/DOMAPI/HTMLHtmlElement.res +3 -685
  35. package/src/DOMAPI/HTMLIFrameElement.res +3 -691
  36. package/src/DOMAPI/HTMLImageElement.res +3 -688
  37. package/src/DOMAPI/HTMLInputElement.res +3 -688
  38. package/src/DOMAPI/HTMLLIElement.res +3 -684
  39. package/src/DOMAPI/HTMLLabelElement.res +3 -688
  40. package/src/DOMAPI/HTMLLegendElement.res +3 -691
  41. package/src/DOMAPI/HTMLLinkElement.res +3 -685
  42. package/src/DOMAPI/HTMLMapElement.res +3 -684
  43. package/src/DOMAPI/HTMLMediaElement.res +49 -722
  44. package/src/DOMAPI/HTMLMenuElement.res +3 -685
  45. package/src/DOMAPI/HTMLMetaElement.res +3 -685
  46. package/src/DOMAPI/HTMLMeterElement.res +3 -688
  47. package/src/DOMAPI/HTMLModElement.res +3 -684
  48. package/src/DOMAPI/HTMLOListElement.res +3 -688
  49. package/src/DOMAPI/HTMLObjectElement.res +3 -691
  50. package/src/DOMAPI/HTMLOptGroupElement.res +3 -695
  51. package/src/DOMAPI/HTMLOptionElement.res +3 -691
  52. package/src/DOMAPI/HTMLOutputElement.res +3 -691
  53. package/src/DOMAPI/HTMLParagraphElement.res +3 -699
  54. package/src/DOMAPI/HTMLPictureElement.res +3 -691
  55. package/src/DOMAPI/HTMLPreElement.res +3 -684
  56. package/src/DOMAPI/HTMLProgressElement.res +3 -695
  57. package/src/DOMAPI/HTMLQuoteElement.res +3 -688
  58. package/src/DOMAPI/HTMLScriptElement.res +3 -691
  59. package/src/DOMAPI/HTMLSelectElement.res +4 -692
  60. package/src/DOMAPI/HTMLSlotElement.res +3 -685
  61. package/src/DOMAPI/HTMLSourceElement.res +3 -691
  62. package/src/DOMAPI/HTMLSpanElement.res +3 -685
  63. package/src/DOMAPI/HTMLStyleElement.res +3 -688
  64. package/src/DOMAPI/HTMLTableCaptionElement.res +3 -712
  65. package/src/DOMAPI/HTMLTableCellElement.res +3 -699
  66. package/src/DOMAPI/HTMLTableElement.res +3 -688
  67. package/src/DOMAPI/HTMLTableRowElement.res +3 -695
  68. package/src/DOMAPI/HTMLTableSectionElement.res +3 -712
  69. package/src/DOMAPI/HTMLTemplateElement.res +3 -695
  70. package/src/DOMAPI/HTMLTextAreaElement.res +3 -695
  71. package/src/DOMAPI/HTMLTimeElement.res +3 -685
  72. package/src/DOMAPI/HTMLTitleElement.res +3 -688
  73. package/src/DOMAPI/HTMLTrackElement.res +3 -688
  74. package/src/DOMAPI/HTMLUListElement.res +3 -688
  75. package/src/DOMAPI/HTMLVideoElement.res +3 -748
  76. package/src/DOMAPI/MediaQueryList.res +3 -80
  77. package/src/DOMAPI/Node.res +59 -124
  78. package/src/DOMAPI/SVGGraphicsElement.res +4 -660
  79. package/src/DOMAPI/ScreenOrientation.res +3 -79
  80. package/src/DOMAPI/ShadowRoot.res +4 -255
  81. package/src/DOMAPI/Text.res +4 -271
  82. package/src/DOMAPI/TextTrackList.res +3 -79
  83. package/src/DOMAPI/Window.res +4 -80
  84. package/src/EncryptedMediaExtensionsAPI/MediaKeySession.res +3 -80
  85. package/src/EventAPI/AbortSignal.res +3 -80
  86. package/src/EventAPI/Event.res +28 -16
  87. package/src/EventAPI/EventTarget.res +51 -39
  88. package/src/FileAPI/Blob.res +26 -15
  89. package/src/FileAPI/File.res +4 -31
  90. package/src/IndexedDBAPI/IDBDatabase.res +3 -79
  91. package/src/IndexedDBAPI/IDBTransaction.res +3 -80
  92. package/src/MediaCaptureAndStreamsAPI/MediaDevices.res +3 -79
  93. package/src/MediaCaptureAndStreamsAPI/MediaStream.res +3 -80
  94. package/src/MediaCaptureAndStreamsAPI/MediaStreamTrack.res +3 -81
  95. package/src/NotificationAPI/Notification.res +3 -80
  96. package/src/PerformanceAPI/Performance.res +3 -79
  97. package/src/RemotePlaybackAPI/RemotePlayback.res +3 -80
  98. package/src/ScreenWakeLockAPI/WakeLockSentinel.res +3 -79
  99. package/src/ServiceWorkerAPI/ServiceWorker.res +3 -79
  100. package/src/ServiceWorkerAPI/ServiceWorkerContainer.res +3 -79
  101. package/src/ServiceWorkerAPI/ServiceWorkerRegistration.res +3 -79
  102. package/src/WebAudioAPI/AnalyserNode.res +4 -148
  103. package/src/WebAudioAPI/AudioBufferSourceNode.res +4 -162
  104. package/src/WebAudioAPI/AudioContext.res +4 -212
  105. package/src/WebAudioAPI/AudioNode.res +39 -113
  106. package/src/WebAudioAPI/AudioProcessingEvent.res +4 -30
  107. package/src/WebAudioAPI/AudioScheduledSourceNode.res +20 -162
  108. package/src/WebAudioAPI/AudioWorkletNode.res +4 -149
  109. package/src/WebAudioAPI/BaseAudioContext.res +85 -155
  110. package/src/WebAudioAPI/BiquadFilterNode.res +4 -149
  111. package/src/WebAudioAPI/ChannelMergerNode.res +4 -149
  112. package/src/WebAudioAPI/ChannelSplitterNode.res +4 -149
  113. package/src/WebAudioAPI/ConstantSourceNode.res +4 -162
  114. package/src/WebAudioAPI/ConvolverNode.res +4 -149
  115. package/src/WebAudioAPI/DelayNode.res +4 -143
  116. package/src/WebAudioAPI/DynamicsCompressorNode.res +4 -152
  117. package/src/WebAudioAPI/GainNode.res +4 -142
  118. package/src/WebAudioAPI/IIRFilterNode.res +4 -149
  119. package/src/WebAudioAPI/MediaElementAudioSourceNode.res +4 -158
  120. package/src/WebAudioAPI/MediaStreamAudioDestinationNode.res +4 -158
  121. package/src/WebAudioAPI/MediaStreamAudioSourceNode.res +4 -158
  122. package/src/WebAudioAPI/OfflineAudioCompletionEvent.res +4 -30
  123. package/src/WebAudioAPI/OfflineAudioContext.res +4 -214
  124. package/src/WebAudioAPI/OscillatorNode.res +4 -162
  125. package/src/WebAudioAPI/PannerNode.res +4 -143
  126. package/src/WebAudioAPI/StereoPannerNode.res +4 -149
  127. package/src/WebAudioAPI/WaveShaperNode.res +4 -149
  128. package/src/WebSocketsAPI/CloseEvent.res +4 -30
  129. package/src/WebSocketsAPI/WebSocket.res +3 -79
  130. package/src/WebSpeechAPI/SpeechSynthesis.res +3 -79
  131. package/src/WebSpeechAPI/SpeechSynthesisUtterance.res +4 -81
  132. package/src/WebStorageAPI/StorageEvent.res +4 -30
  133. package/src/WebVTTAPI/TextTrack.res +3 -79
@@ -1,6 +1,9 @@
1
- open EventAPI
2
1
  open WebAudioAPI
3
2
 
3
+ include AudioScheduledSourceNode.Impl({
4
+ type t = audioBufferSourceNode
5
+ })
6
+
4
7
  /**
5
8
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioBufferSourceNode)
6
9
  */
@@ -10,167 +13,6 @@ external make: (
10
13
  ~options: audioBufferSourceOptions=?,
11
14
  ) => audioBufferSourceNode = "AudioBufferSourceNode"
12
15
 
13
- external asAudioScheduledSourceNode: audioBufferSourceNode => audioScheduledSourceNode = "%identity"
14
- external asAudioNode: audioBufferSourceNode => audioNode = "%identity"
15
- external asEventTarget: audioBufferSourceNode => eventTarget = "%identity"
16
- /**
17
- 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.
18
-
19
- 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.
20
-
21
- 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.
22
-
23
- 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.
24
-
25
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
26
-
27
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
28
-
29
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
30
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
31
- */
32
- @send
33
- external addEventListener: (
34
- audioBufferSourceNode,
35
- ~type_: eventType,
36
- ~callback: eventListener<'event>,
37
- ~options: addEventListenerOptions=?,
38
- ) => unit = "addEventListener"
39
-
40
- /**
41
- 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.
42
-
43
- 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.
44
-
45
- 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.
46
-
47
- 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.
48
-
49
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
50
-
51
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
52
-
53
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
54
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
55
- */
56
- @send
57
- external addEventListener2: (
58
- audioBufferSourceNode,
59
- ~type_: eventType,
60
- ~callback: eventListener<'event>,
61
- ~options: bool=?,
62
- ) => unit = "addEventListener"
63
-
64
- /**
65
- Removes the event listener in target's event listener list with the same type, callback, and options.
66
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
67
- */
68
- @send
69
- external removeEventListener: (
70
- audioBufferSourceNode,
71
- ~type_: eventType,
72
- ~callback: eventListener<'event>,
73
- ~options: eventListenerOptions=?,
74
- ) => unit = "removeEventListener"
75
-
76
- /**
77
- Removes the event listener in target's event listener list with the same type, callback, and options.
78
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
79
- */
80
- @send
81
- external removeEventListener2: (
82
- audioBufferSourceNode,
83
- ~type_: eventType,
84
- ~callback: eventListener<'event>,
85
- ~options: bool=?,
86
- ) => unit = "removeEventListener"
87
-
88
- /**
89
- 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.
90
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
91
- */
92
- @send
93
- external dispatchEvent: (audioBufferSourceNode, event) => bool = "dispatchEvent"
94
-
95
- /**
96
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/connect)
97
- */
98
- @send
99
- external connect: (
100
- audioBufferSourceNode,
101
- ~destinationNode: audioNode,
102
- ~output: int=?,
103
- ~input: int=?,
104
- ) => audioNode = "connect"
105
-
106
- /**
107
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/connect)
108
- */
109
- @send
110
- external connect2: (audioBufferSourceNode, ~destinationParam: audioParam, ~output: int=?) => unit =
111
- "connect"
112
-
113
- /**
114
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
115
- */
116
- @send
117
- external disconnect: audioBufferSourceNode => unit = "disconnect"
118
-
119
- /**
120
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
121
- */
122
- @send
123
- external disconnect2: (audioBufferSourceNode, int) => unit = "disconnect"
124
-
125
- /**
126
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
127
- */
128
- @send
129
- external disconnect3: (audioBufferSourceNode, audioNode) => unit = "disconnect"
130
-
131
- /**
132
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
133
- */
134
- @send
135
- external disconnect4: (audioBufferSourceNode, ~destinationNode: audioNode, ~output: int) => unit =
136
- "disconnect"
137
-
138
- /**
139
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
140
- */
141
- @send
142
- external disconnect5: (
143
- audioBufferSourceNode,
144
- ~destinationNode: audioNode,
145
- ~output: int,
146
- ~input: int,
147
- ) => unit = "disconnect"
148
-
149
- /**
150
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
151
- */
152
- @send
153
- external disconnect6: (audioBufferSourceNode, audioParam) => unit = "disconnect"
154
-
155
- /**
156
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
157
- */
158
- @send
159
- external disconnect7: (audioBufferSourceNode, ~destinationParam: audioParam, ~output: int) => unit =
160
- "disconnect"
161
-
162
- /**
163
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioScheduledSourceNode/start)
164
- */
165
- @send
166
- external start: (audioBufferSourceNode, ~when_: float=?) => unit = "start"
167
-
168
- /**
169
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioScheduledSourceNode/stop)
170
- */
171
- @send
172
- external stop: (audioBufferSourceNode, ~when_: float=?) => unit = "stop"
173
-
174
16
  /**
175
17
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioBufferSourceNode/start)
176
18
  */
@@ -1,225 +1,17 @@
1
- open EventAPI
2
1
  open WebAudioAPI
3
2
  open DOMAPI
4
3
  open MediaCaptureAndStreamsAPI
5
4
 
5
+ include BaseAudioContext.Impl({
6
+ type t = audioContext
7
+ })
8
+
6
9
  /**
7
10
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioContext)
8
11
  */
9
12
  @new
10
13
  external make: (~contextOptions: audioContextOptions=?) => audioContext = "AudioContext"
11
14
 
12
- external asBaseAudioContext: audioContext => baseAudioContext = "%identity"
13
- external asEventTarget: audioContext => eventTarget = "%identity"
14
- /**
15
- 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.
16
-
17
- 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.
18
-
19
- 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.
20
-
21
- 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.
22
-
23
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
24
-
25
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
26
-
27
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
28
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
29
- */
30
- @send
31
- external addEventListener: (
32
- audioContext,
33
- ~type_: eventType,
34
- ~callback: eventListener<'event>,
35
- ~options: addEventListenerOptions=?,
36
- ) => unit = "addEventListener"
37
-
38
- /**
39
- 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.
40
-
41
- 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.
42
-
43
- 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.
44
-
45
- 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.
46
-
47
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
48
-
49
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
50
-
51
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
52
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
53
- */
54
- @send
55
- external addEventListener2: (
56
- audioContext,
57
- ~type_: eventType,
58
- ~callback: eventListener<'event>,
59
- ~options: bool=?,
60
- ) => unit = "addEventListener"
61
-
62
- /**
63
- Removes the event listener in target's event listener list with the same type, callback, and options.
64
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
65
- */
66
- @send
67
- external removeEventListener: (
68
- audioContext,
69
- ~type_: eventType,
70
- ~callback: eventListener<'event>,
71
- ~options: eventListenerOptions=?,
72
- ) => unit = "removeEventListener"
73
-
74
- /**
75
- Removes the event listener in target's event listener list with the same type, callback, and options.
76
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
77
- */
78
- @send
79
- external removeEventListener2: (
80
- audioContext,
81
- ~type_: eventType,
82
- ~callback: eventListener<'event>,
83
- ~options: bool=?,
84
- ) => unit = "removeEventListener"
85
-
86
- /**
87
- 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.
88
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
89
- */
90
- @send
91
- external dispatchEvent: (audioContext, event) => bool = "dispatchEvent"
92
-
93
- /**
94
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createAnalyser)
95
- */
96
- @send
97
- external createAnalyser: audioContext => analyserNode = "createAnalyser"
98
-
99
- /**
100
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createBiquadFilter)
101
- */
102
- @send
103
- external createBiquadFilter: audioContext => biquadFilterNode = "createBiquadFilter"
104
-
105
- /**
106
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createBuffer)
107
- */
108
- @send
109
- external createBuffer: (
110
- audioContext,
111
- ~numberOfChannels: int,
112
- ~length: int,
113
- ~sampleRate: float,
114
- ) => audioBuffer = "createBuffer"
115
-
116
- /**
117
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createBufferSource)
118
- */
119
- @send
120
- external createBufferSource: audioContext => audioBufferSourceNode = "createBufferSource"
121
-
122
- /**
123
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createChannelMerger)
124
- */
125
- @send
126
- external createChannelMerger: (audioContext, ~numberOfInputs: int=?) => channelMergerNode =
127
- "createChannelMerger"
128
-
129
- /**
130
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createChannelSplitter)
131
- */
132
- @send
133
- external createChannelSplitter: (audioContext, ~numberOfOutputs: int=?) => channelSplitterNode =
134
- "createChannelSplitter"
135
-
136
- /**
137
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createConstantSource)
138
- */
139
- @send
140
- external createConstantSource: audioContext => constantSourceNode = "createConstantSource"
141
-
142
- /**
143
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createConvolver)
144
- */
145
- @send
146
- external createConvolver: audioContext => convolverNode = "createConvolver"
147
-
148
- /**
149
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createDelay)
150
- */
151
- @send
152
- external createDelay: (audioContext, ~maxDelayTime: float=?) => delayNode = "createDelay"
153
-
154
- /**
155
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createDynamicsCompressor)
156
- */
157
- @send
158
- external createDynamicsCompressor: audioContext => dynamicsCompressorNode =
159
- "createDynamicsCompressor"
160
-
161
- /**
162
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createGain)
163
- */
164
- @send
165
- external createGain: audioContext => gainNode = "createGain"
166
-
167
- /**
168
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createIIRFilter)
169
- */
170
- @send
171
- external createIIRFilter: (
172
- audioContext,
173
- ~feedforward: array<float>,
174
- ~feedback: array<float>,
175
- ) => iirFilterNode = "createIIRFilter"
176
-
177
- /**
178
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createOscillator)
179
- */
180
- @send
181
- external createOscillator: audioContext => oscillatorNode = "createOscillator"
182
-
183
- /**
184
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createPanner)
185
- */
186
- @send
187
- external createPanner: audioContext => pannerNode = "createPanner"
188
-
189
- /**
190
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createPeriodicWave)
191
- */
192
- @send
193
- external createPeriodicWave: (
194
- audioContext,
195
- ~real: array<float>,
196
- ~imag: array<float>,
197
- ~constraints: periodicWaveConstraints=?,
198
- ) => periodicWave = "createPeriodicWave"
199
-
200
- /**
201
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createStereoPanner)
202
- */
203
- @send
204
- external createStereoPanner: audioContext => stereoPannerNode = "createStereoPanner"
205
-
206
- /**
207
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createWaveShaper)
208
- */
209
- @send
210
- external createWaveShaper: audioContext => waveShaperNode = "createWaveShaper"
211
-
212
- /**
213
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/decodeAudioData)
214
- */
215
- @send
216
- external decodeAudioData: (
217
- audioContext,
218
- ~audioData: ArrayBuffer.t,
219
- ~successCallback: decodeSuccessCallback=?,
220
- ~errorCallback: decodeErrorCallback=?,
221
- ) => Promise.t<audioBuffer> = "decodeAudioData"
222
-
223
15
  /**
224
16
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioContext/getOutputTimestamp)
225
17
  */
@@ -1,143 +1,69 @@
1
- open EventAPI
2
1
  open WebAudioAPI
3
2
 
4
- external asEventTarget: audioNode => 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.
3
+ module Impl = (
4
+ T: {
5
+ type t
6
+ },
7
+ ) => {
8
+ include EventTarget.Impl({
9
+ type t = T.t
10
+ })
7
11
 
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.
12
+ external asAudioNode: T.t => audioNode = "%identity"
9
13
 
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
- audioNode,
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
- audioNode,
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
- audioNode,
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
- audioNode,
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: (audioNode, event) => bool = "dispatchEvent"
83
-
84
- /**
14
+ /**
85
15
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/connect)
86
16
  */
87
- @send
88
- external connect: (
89
- audioNode,
90
- ~destinationNode: audioNode,
91
- ~output: int=?,
92
- ~input: int=?,
93
- ) => audioNode = "connect"
17
+ @send
18
+ external connect: (T.t, ~destinationNode: audioNode, ~output: int=?, ~input: int=?) => audioNode =
19
+ "connect"
94
20
 
95
- /**
21
+ /**
96
22
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/connect)
97
23
  */
98
- @send
99
- external connect2: (audioNode, ~destinationParam: audioParam, ~output: int=?) => unit = "connect"
24
+ @send
25
+ external connect2: (T.t, ~destinationParam: audioParam, ~output: int=?) => unit = "connect"
100
26
 
101
- /**
27
+ /**
102
28
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
103
29
  */
104
- @send
105
- external disconnect: audioNode => unit = "disconnect"
30
+ @send
31
+ external disconnect: T.t => unit = "disconnect"
106
32
 
107
- /**
33
+ /**
108
34
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
109
35
  */
110
- @send
111
- external disconnect2: (audioNode, int) => unit = "disconnect"
36
+ @send
37
+ external disconnect2: (T.t, int) => unit = "disconnect"
112
38
 
113
- /**
39
+ /**
114
40
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
115
41
  */
116
- @send
117
- external disconnect3: (audioNode, audioNode) => unit = "disconnect"
42
+ @send
43
+ external disconnect3: (T.t, audioNode) => unit = "disconnect"
118
44
 
119
- /**
45
+ /**
120
46
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
121
47
  */
122
- @send
123
- external disconnect4: (audioNode, ~destinationNode: audioNode, ~output: int) => unit = "disconnect"
48
+ @send
49
+ external disconnect4: (T.t, ~destinationNode: audioNode, ~output: int) => unit = "disconnect"
124
50
 
125
- /**
51
+ /**
126
52
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
127
53
  */
128
- @send
129
- external disconnect5: (audioNode, ~destinationNode: audioNode, ~output: int, ~input: int) => unit =
130
- "disconnect"
54
+ @send
55
+ external disconnect5: (T.t, ~destinationNode: audioNode, ~output: int, ~input: int) => unit =
56
+ "disconnect"
131
57
 
132
- /**
58
+ /**
133
59
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
134
60
  */
135
- @send
136
- external disconnect6: (audioNode, audioParam) => unit = "disconnect"
61
+ @send
62
+ external disconnect6: (T.t, audioParam) => unit = "disconnect"
137
63
 
138
- /**
64
+ /**
139
65
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
140
66
  */
141
- @send
142
- external disconnect7: (audioNode, ~destinationParam: audioParam, ~output: int) => unit =
143
- "disconnect"
67
+ @send
68
+ external disconnect7: (T.t, ~destinationParam: audioParam, ~output: int) => unit = "disconnect"
69
+ }
@@ -1,38 +1,12 @@
1
- open EventAPI
2
1
  open WebAudioAPI
3
2
 
3
+ include Event.Impl({
4
+ type t = audioProcessingEvent
5
+ })
6
+
4
7
  /**
5
8
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioProcessingEvent)
6
9
  */
7
10
  @new
8
11
  external make: (~type_: string, ~eventInitDict: audioProcessingEventInit) => audioProcessingEvent =
9
12
  "AudioProcessingEvent"
10
-
11
- external asEvent: audioProcessingEvent => event = "%identity"
12
- /**
13
- Returns the invocation target objects of event's path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root's mode is "closed" that are not reachable from event's currentTarget.
14
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Event/composedPath)
15
- */
16
- @send
17
- external composedPath: audioProcessingEvent => array<eventTarget> = "composedPath"
18
-
19
- /**
20
- When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.
21
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)
22
- */
23
- @send
24
- external stopPropagation: audioProcessingEvent => unit = "stopPropagation"
25
-
26
- /**
27
- Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects.
28
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)
29
- */
30
- @send
31
- external stopImmediatePropagation: audioProcessingEvent => unit = "stopImmediatePropagation"
32
-
33
- /**
34
- If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled.
35
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)
36
- */
37
- @send
38
- external preventDefault: audioProcessingEvent => unit = "preventDefault"