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