@rescript/webapi 0.1.0-experimental-29b94b3

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 (281) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +14 -0
  3. package/package.json +38 -0
  4. package/rescript.json +19 -0
  5. package/src/CSSFontLoadingAPI/FontFace.res +34 -0
  6. package/src/CSSFontLoadingAPI/FontFaceSet.res +112 -0
  7. package/src/CSSFontLoadingAPI.res +101 -0
  8. package/src/CanvasAPI/ImageBitmap.res +8 -0
  9. package/src/CanvasAPI/OffscreenCanvas.res +123 -0
  10. package/src/CanvasAPI.res +55 -0
  11. package/src/ChannelMessagingAPI/MessagePort.res +120 -0
  12. package/src/ChannelMessagingAPI.res +13 -0
  13. package/src/ClipboardAPI/Clipboard.res +106 -0
  14. package/src/ClipboardAPI/ClipboardItem.res +21 -0
  15. package/src/ClipboardAPI.res +31 -0
  16. package/src/CredentialManagementAPI/CredentialsContainer.res +31 -0
  17. package/src/CredentialManagementAPI.res +140 -0
  18. package/src/DOMAPI/Animation.res +137 -0
  19. package/src/DOMAPI/AnimationEffect.res +19 -0
  20. package/src/DOMAPI/CSSRuleList.res +7 -0
  21. package/src/DOMAPI/CSSStyleDeclaration.res +36 -0
  22. package/src/DOMAPI/CSSStyleSheet.res +32 -0
  23. package/src/DOMAPI/CSSStyleValue.res +13 -0
  24. package/src/DOMAPI/CaretPosition.res +4 -0
  25. package/src/DOMAPI/CharacterData.res +272 -0
  26. package/src/DOMAPI/Comment.res +278 -0
  27. package/src/DOMAPI/CustomElementRegistry.res +31 -0
  28. package/src/DOMAPI/DOMImplementation.res +30 -0
  29. package/src/DOMAPI/DOMMatrix.res +169 -0
  30. package/src/DOMAPI/DOMMatrixReadOnly.res +103 -0
  31. package/src/DOMAPI/DOMPoint.res +29 -0
  32. package/src/DOMAPI/DOMPointReadOnly.res +24 -0
  33. package/src/DOMAPI/DOMRect.res +23 -0
  34. package/src/DOMAPI/DOMRectList.res +4 -0
  35. package/src/DOMAPI/DOMRectReadOnly.res +17 -0
  36. package/src/DOMAPI/DOMTokenList.res +72 -0
  37. package/src/DOMAPI/Document.res +634 -0
  38. package/src/DOMAPI/DocumentFragment.res +261 -0
  39. package/src/DOMAPI/DocumentTimeline.res +9 -0
  40. package/src/DOMAPI/Element.res +634 -0
  41. package/src/DOMAPI/ElementInternals.res +39 -0
  42. package/src/DOMAPI/FileList.res +8 -0
  43. package/src/DOMAPI/HTMLAnchorElement.res +693 -0
  44. package/src/DOMAPI/HTMLAreaElement.res +687 -0
  45. package/src/DOMAPI/HTMLAudioElement.res +750 -0
  46. package/src/DOMAPI/HTMLBRElement.res +686 -0
  47. package/src/DOMAPI/HTMLBaseElement.res +687 -0
  48. package/src/DOMAPI/HTMLBodyElement.res +687 -0
  49. package/src/DOMAPI/HTMLButtonElement.res +714 -0
  50. package/src/DOMAPI/HTMLCanvasElement.res +741 -0
  51. package/src/DOMAPI/HTMLCollection.res +15 -0
  52. package/src/DOMAPI/HTMLCollectionOf.res +16 -0
  53. package/src/DOMAPI/HTMLDListElement.res +690 -0
  54. package/src/DOMAPI/HTMLDataElement.res +687 -0
  55. package/src/DOMAPI/HTMLDataListElement.res +697 -0
  56. package/src/DOMAPI/HTMLDialogElement.res +715 -0
  57. package/src/DOMAPI/HTMLDivElement.res +686 -0
  58. package/src/DOMAPI/HTMLElement.res +685 -0
  59. package/src/DOMAPI/HTMLEmbedElement.res +693 -0
  60. package/src/DOMAPI/HTMLFieldSetElement.res +718 -0
  61. package/src/DOMAPI/HTMLFormControlsCollection.res +16 -0
  62. package/src/DOMAPI/HTMLFormElement.res +720 -0
  63. package/src/DOMAPI/HTMLFrameSetElement.res +697 -0
  64. package/src/DOMAPI/HTMLHRElement.res +686 -0
  65. package/src/DOMAPI/HTMLHeadElement.res +687 -0
  66. package/src/DOMAPI/HTMLHeadingElement.res +693 -0
  67. package/src/DOMAPI/HTMLHtmlElement.res +687 -0
  68. package/src/DOMAPI/HTMLIFrameElement.res +696 -0
  69. package/src/DOMAPI/HTMLImageElement.res +696 -0
  70. package/src/DOMAPI/HTMLInputElement.res +773 -0
  71. package/src/DOMAPI/HTMLLIElement.res +686 -0
  72. package/src/DOMAPI/HTMLLabelElement.res +690 -0
  73. package/src/DOMAPI/HTMLLegendElement.res +693 -0
  74. package/src/DOMAPI/HTMLLinkElement.res +687 -0
  75. package/src/DOMAPI/HTMLMapElement.res +686 -0
  76. package/src/DOMAPI/HTMLMediaElement.res +749 -0
  77. package/src/DOMAPI/HTMLMenuElement.res +687 -0
  78. package/src/DOMAPI/HTMLMetaElement.res +687 -0
  79. package/src/DOMAPI/HTMLMeterElement.res +690 -0
  80. package/src/DOMAPI/HTMLModElement.res +686 -0
  81. package/src/DOMAPI/HTMLOListElement.res +690 -0
  82. package/src/DOMAPI/HTMLObjectElement.res +717 -0
  83. package/src/DOMAPI/HTMLOptGroupElement.res +697 -0
  84. package/src/DOMAPI/HTMLOptionElement.res +693 -0
  85. package/src/DOMAPI/HTMLOptionsCollection.res +21 -0
  86. package/src/DOMAPI/HTMLOutputElement.res +711 -0
  87. package/src/DOMAPI/HTMLParagraphElement.res +701 -0
  88. package/src/DOMAPI/HTMLPictureElement.res +693 -0
  89. package/src/DOMAPI/HTMLPreElement.res +686 -0
  90. package/src/DOMAPI/HTMLProgressElement.res +697 -0
  91. package/src/DOMAPI/HTMLQuoteElement.res +690 -0
  92. package/src/DOMAPI/HTMLScriptElement.res +699 -0
  93. package/src/DOMAPI/HTMLSelectElement.res +762 -0
  94. package/src/DOMAPI/HTMLSlotElement.res +713 -0
  95. package/src/DOMAPI/HTMLSourceElement.res +693 -0
  96. package/src/DOMAPI/HTMLSpanElement.res +687 -0
  97. package/src/DOMAPI/HTMLStyleElement.res +690 -0
  98. package/src/DOMAPI/HTMLTableCaptionElement.res +714 -0
  99. package/src/DOMAPI/HTMLTableCellElement.res +701 -0
  100. package/src/DOMAPI/HTMLTableElement.res +755 -0
  101. package/src/DOMAPI/HTMLTableRowElement.res +713 -0
  102. package/src/DOMAPI/HTMLTableSectionElement.res +730 -0
  103. package/src/DOMAPI/HTMLTemplateElement.res +697 -0
  104. package/src/DOMAPI/HTMLTextAreaElement.res +758 -0
  105. package/src/DOMAPI/HTMLTimeElement.res +687 -0
  106. package/src/DOMAPI/HTMLTitleElement.res +690 -0
  107. package/src/DOMAPI/HTMLTrackElement.res +690 -0
  108. package/src/DOMAPI/HTMLUListElement.res +690 -0
  109. package/src/DOMAPI/HTMLVideoElement.res +778 -0
  110. package/src/DOMAPI/IdleDeadline.res +7 -0
  111. package/src/DOMAPI/ImageData.res +18 -0
  112. package/src/DOMAPI/Location.res +22 -0
  113. package/src/DOMAPI/MediaList.res +19 -0
  114. package/src/DOMAPI/MediaQueryList.res +82 -0
  115. package/src/DOMAPI/NamedNodeMap.res +45 -0
  116. package/src/DOMAPI/Navigator.res +114 -0
  117. package/src/DOMAPI/Node.res +179 -0
  118. package/src/DOMAPI/NodeFilter.res +4 -0
  119. package/src/DOMAPI/NodeIterator.res +13 -0
  120. package/src/DOMAPI/NodeList.res +8 -0
  121. package/src/DOMAPI/NodeListOf.res +9 -0
  122. package/src/DOMAPI/Range.res +149 -0
  123. package/src/DOMAPI/SVGGraphicsElement.res +675 -0
  124. package/src/DOMAPI/SVGLength.res +11 -0
  125. package/src/DOMAPI/ScreenOrientation.res +88 -0
  126. package/src/DOMAPI/Selection.res +103 -0
  127. package/src/DOMAPI/ShadowRoot.res +274 -0
  128. package/src/DOMAPI/StylePropertyMap.res +50 -0
  129. package/src/DOMAPI/StylePropertyMapReadOnly.res +13 -0
  130. package/src/DOMAPI/StyleSheetList.res +7 -0
  131. package/src/DOMAPI/Text.res +285 -0
  132. package/src/DOMAPI/TextTrackList.res +89 -0
  133. package/src/DOMAPI/TimeRanges.res +19 -0
  134. package/src/DOMAPI/TreeWalker.res +43 -0
  135. package/src/DOMAPI/VideoColorSpace.res +13 -0
  136. package/src/DOMAPI/VideoFrame.res +111 -0
  137. package/src/DOMAPI/Window.res +582 -0
  138. package/src/DOMAPI/XPathExpression.res +12 -0
  139. package/src/DOMAPI/XPathResult.res +13 -0
  140. package/src/DOMAPI.res +9668 -0
  141. package/src/EncryptedMediaExtensionsAPI/MediaKeySession.res +132 -0
  142. package/src/EncryptedMediaExtensionsAPI/MediaKeyStatusMap.res +13 -0
  143. package/src/EncryptedMediaExtensionsAPI/MediaKeySystemAccess.res +13 -0
  144. package/src/EncryptedMediaExtensionsAPI/MediaKeys.res +28 -0
  145. package/src/EncryptedMediaExtensionsAPI.res +100 -0
  146. package/src/EventAPI/AbortController.res +15 -0
  147. package/src/EventAPI/AbortSignal.res +106 -0
  148. package/src/EventAPI/Event.res +35 -0
  149. package/src/EventAPI/EventTarget.res +86 -0
  150. package/src/EventAPI.res +215 -0
  151. package/src/FetchAPI/FormData.res +58 -0
  152. package/src/FetchAPI/Headers.res +50 -0
  153. package/src/FetchAPI/Request.res +57 -0
  154. package/src/FetchAPI/Response.res +105 -0
  155. package/src/FetchAPI/URLSearchParams.res +68 -0
  156. package/src/FetchAPI.res +287 -0
  157. package/src/FileAPI/Blob.res +37 -0
  158. package/src/FileAPI/File.res +42 -0
  159. package/src/FileAPI/FileSystemDirectoryHandle.res +46 -0
  160. package/src/FileAPI/FileSystemFileHandle.res +23 -0
  161. package/src/FileAPI/FileSystemHandle.res +7 -0
  162. package/src/FileAPI/FileSystemWritableFileStream.res +63 -0
  163. package/src/FileAPI/ReadableStream.res +61 -0
  164. package/src/FileAPI/WritableStream.res +29 -0
  165. package/src/FileAPI/WritableStreamDefaultController.res +8 -0
  166. package/src/FileAPI.res +218 -0
  167. package/src/FileAndDirectoryEntriesAPI/FileSystemDirectoryEntry.res +42 -0
  168. package/src/FileAndDirectoryEntriesAPI/FileSystemDirectoryReader.res +12 -0
  169. package/src/FileAndDirectoryEntriesAPI/FileSystemEntry.res +11 -0
  170. package/src/FileAndDirectoryEntriesAPI.res +87 -0
  171. package/src/GamepadAPI/GamepadHapticActuator.res +17 -0
  172. package/src/GamepadAPI.res +85 -0
  173. package/src/GeolocationAPI/Geolocation.res +29 -0
  174. package/src/GeolocationAPI/GeolocationCoordinates.res +7 -0
  175. package/src/GeolocationAPI/GeolocationPosition.res +7 -0
  176. package/src/GeolocationAPI.res +78 -0
  177. package/src/Global.res +302 -0
  178. package/src/HistoryAPI/History.res +33 -0
  179. package/src/HistoryAPI.res +26 -0
  180. package/src/IndexedDBAPI/IDBDatabase.res +135 -0
  181. package/src/IndexedDBAPI/IDBFactory.res +31 -0
  182. package/src/IndexedDBAPI/IDBIndex.res +74 -0
  183. package/src/IndexedDBAPI/IDBObjectStore.res +167 -0
  184. package/src/IndexedDBAPI/IDBTransaction.res +102 -0
  185. package/src/IndexedDBAPI.res +205 -0
  186. package/src/MediaCapabilitiesAPI/MediaCapabilities.res +19 -0
  187. package/src/MediaCapabilitiesAPI.res +81 -0
  188. package/src/MediaCaptureAndStreamsAPI/MediaDeviceInfo.res +7 -0
  189. package/src/MediaCaptureAndStreamsAPI/MediaDevices.res +113 -0
  190. package/src/MediaCaptureAndStreamsAPI/MediaStream.res +142 -0
  191. package/src/MediaCaptureAndStreamsAPI/MediaStreamTrack.res +122 -0
  192. package/src/MediaCaptureAndStreamsAPI.res +194 -0
  193. package/src/MediaSessionAPI/MediaMetadata.res +7 -0
  194. package/src/MediaSessionAPI/MediaSession.res +17 -0
  195. package/src/MediaSessionAPI.res +83 -0
  196. package/src/NotificationAPI/Notification.res +102 -0
  197. package/src/NotificationAPI.res +82 -0
  198. package/src/PerformanceAPI/Performance.res +169 -0
  199. package/src/PerformanceAPI/PerformanceEntry.res +7 -0
  200. package/src/PerformanceAPI/PerformanceMark.res +15 -0
  201. package/src/PerformanceAPI.res +86 -0
  202. package/src/PermissionsAPI/Permissions.res +7 -0
  203. package/src/PermissionsAPI.res +39 -0
  204. package/src/PictureInPicture.res +18 -0
  205. package/src/PictureInPictureAPI.res +18 -0
  206. package/src/Prelude/DOMException.res +7 -0
  207. package/src/Prelude/DOMStringList.res +15 -0
  208. package/src/Prelude.res +39 -0
  209. package/src/PushManagerAPI/PushManager.res +25 -0
  210. package/src/PushManagerAPI/PushSubscription.res +19 -0
  211. package/src/PushManagerAPI.res +67 -0
  212. package/src/RemotePlaybackAPI/RemotePlayback.res +102 -0
  213. package/src/RemotePlaybackAPI.res +21 -0
  214. package/src/ResizeObserverAPI/ResizeObserver.res +27 -0
  215. package/src/ResizeObserverAPI.res +58 -0
  216. package/src/ScreenWakeLockAPI/WakeLock.res +7 -0
  217. package/src/ScreenWakeLockAPI/WakeLockSentinel.res +88 -0
  218. package/src/ScreenWakeLockAPI.res +26 -0
  219. package/src/ServiceWorkerAPI/Cache.res +100 -0
  220. package/src/ServiceWorkerAPI/CacheStorage.res +46 -0
  221. package/src/ServiceWorkerAPI/NavigationPreloadManager.res +25 -0
  222. package/src/ServiceWorkerAPI/ServiceWorker.res +101 -0
  223. package/src/ServiceWorkerAPI/ServiceWorkerContainer.res +114 -0
  224. package/src/ServiceWorkerAPI/ServiceWorkerRegistration.res +114 -0
  225. package/src/ServiceWorkerAPI.res +134 -0
  226. package/src/StorageAPI/StorageManager.res +26 -0
  227. package/src/StorageAPI.res +10 -0
  228. package/src/ViewTransitionsAPI/ViewTransition.res +7 -0
  229. package/src/ViewTransitionsAPI.res +23 -0
  230. package/src/VisualViewportAPI.res +38 -0
  231. package/src/WebAudioAPI/AnalyserNode.res +180 -0
  232. package/src/WebAudioAPI/AudioBuffer.res +35 -0
  233. package/src/WebAudioAPI/AudioBufferSourceNode.res +183 -0
  234. package/src/WebAudioAPI/AudioContext.res +266 -0
  235. package/src/WebAudioAPI/AudioListener.res +1 -0
  236. package/src/WebAudioAPI/AudioNode.res +143 -0
  237. package/src/WebAudioAPI/AudioParam.res +56 -0
  238. package/src/WebAudioAPI/AudioProcessingEvent.res +38 -0
  239. package/src/WebAudioAPI/AudioScheduledSourceNode.res +171 -0
  240. package/src/WebAudioAPI/AudioWorkletNode.res +160 -0
  241. package/src/WebAudioAPI/BaseAudioContext.res +212 -0
  242. package/src/WebAudioAPI/BiquadFilterNode.res +168 -0
  243. package/src/WebAudioAPI/ChannelMergerNode.res +157 -0
  244. package/src/WebAudioAPI/ChannelSplitterNode.res +159 -0
  245. package/src/WebAudioAPI/ConstantSourceNode.res +172 -0
  246. package/src/WebAudioAPI/ConvolverNode.res +157 -0
  247. package/src/WebAudioAPI/DelayNode.res +150 -0
  248. package/src/WebAudioAPI/DynamicsCompressorNode.res +162 -0
  249. package/src/WebAudioAPI/GainNode.res +149 -0
  250. package/src/WebAudioAPI/IIRFilterNode.res +168 -0
  251. package/src/WebAudioAPI/MediaElementAudioSourceNode.res +168 -0
  252. package/src/WebAudioAPI/MediaStreamAudioDestinationNode.res +168 -0
  253. package/src/WebAudioAPI/MediaStreamAudioSourceNode.res +168 -0
  254. package/src/WebAudioAPI/OfflineAudioCompletionEvent.res +40 -0
  255. package/src/WebAudioAPI/OfflineAudioContext.res +246 -0
  256. package/src/WebAudioAPI/OscillatorNode.res +176 -0
  257. package/src/WebAudioAPI/PannerNode.res +150 -0
  258. package/src/WebAudioAPI/PeriodicWave.res +8 -0
  259. package/src/WebAudioAPI/StereoPannerNode.res +157 -0
  260. package/src/WebAudioAPI/WaveShaperNode.res +157 -0
  261. package/src/WebAudioAPI/Worklet.res +13 -0
  262. package/src/WebAudioAPI.res +1271 -0
  263. package/src/WebCryptoAPI/Crypto.res +13 -0
  264. package/src/WebCryptoAPI/SubtleCrypto.res +173 -0
  265. package/src/WebCryptoAPI.res +71 -0
  266. package/src/WebLocksAPI/LockManager.res +29 -0
  267. package/src/WebLocksAPI.res +47 -0
  268. package/src/WebMIDIAPI.res +37 -0
  269. package/src/WebSocketsAPI/CloseEvent.res +37 -0
  270. package/src/WebSocketsAPI/MessageEvent.res +38 -0
  271. package/src/WebSocketsAPI/WebSocket.res +130 -0
  272. package/src/WebSocketsAPI.res +125 -0
  273. package/src/WebSpeechAPI/SpeechSynthesis.res +112 -0
  274. package/src/WebSpeechAPI/SpeechSynthesisUtterance.res +88 -0
  275. package/src/WebSpeechAPI.res +82 -0
  276. package/src/WebStorageAPI/Storage.res +44 -0
  277. package/src/WebStorageAPI/StorageEvent.res +37 -0
  278. package/src/WebStorageAPI.res +57 -0
  279. package/src/WebVTTAPI/TextTrack.res +96 -0
  280. package/src/WebVTTAPI/TextTrackCueList.res +10 -0
  281. package/src/WebVTTAPI.res +122 -0
@@ -0,0 +1,125 @@
1
+ @@warning("-30")
2
+
3
+ open Prelude
4
+ open EventAPI
5
+ open ChannelMessagingAPI
6
+
7
+ type binaryType =
8
+ | @as("arraybuffer") Arraybuffer
9
+ | @as("blob") Blob
10
+
11
+ type messageEventSource = any
12
+
13
+ /**
14
+ Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
15
+ [See WebSocket on MDN](https://developer.mozilla.org/docs/Web/API/WebSocket)
16
+ */
17
+ type webSocket = {
18
+ ...eventTarget,
19
+ /**
20
+ Returns the URL that was used to establish the WebSocket connection.
21
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/WebSocket/url)
22
+ */
23
+ url: string,
24
+ /**
25
+ Returns the state of the WebSocket object's connection. It can have the values described below.
26
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/WebSocket/readyState)
27
+ */
28
+ readyState: int,
29
+ /**
30
+ Returns the number of bytes of application data (UTF-8 text and binary data) that have been queued using send() but not yet been transmitted to the network.
31
+
32
+ If the WebSocket connection is closed, this attribute's value will only increase with each call to the send() method. (The number does not reset to zero once the connection closes.)
33
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/WebSocket/bufferedAmount)
34
+ */
35
+ bufferedAmount: int,
36
+ /**
37
+ Returns the extensions selected by the server, if any.
38
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
39
+ */
40
+ extensions: string,
41
+ /**
42
+ Returns the subprotocol selected by the server, if any. It can be used in conjunction with the array form of the constructor's second argument to perform subprotocol negotiation.
43
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/WebSocket/protocol)
44
+ */
45
+ protocol: string,
46
+ /**
47
+ Returns a string that indicates how binary data from the WebSocket object is exposed to scripts:
48
+
49
+ Can be set, to change how binary data is returned. The default is "blob".
50
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
51
+ */
52
+ mutable binaryType: binaryType,
53
+ }
54
+
55
+ /**
56
+ A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute.
57
+ [See CloseEvent on MDN](https://developer.mozilla.org/docs/Web/API/CloseEvent)
58
+ */
59
+ type closeEvent = {
60
+ ...event,
61
+ /**
62
+ Returns true if the connection closed cleanly; false otherwise.
63
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CloseEvent/wasClean)
64
+ */
65
+ wasClean: bool,
66
+ /**
67
+ Returns the WebSocket connection close code provided by the server.
68
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CloseEvent/code)
69
+ */
70
+ code: int,
71
+ /**
72
+ Returns the WebSocket connection close reason provided by the server.
73
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CloseEvent/reason)
74
+ */
75
+ reason: string,
76
+ }
77
+
78
+ /**
79
+ A message received by a target object.
80
+ [See MessageEvent on MDN](https://developer.mozilla.org/docs/Web/API/MessageEvent)
81
+ */
82
+ type messageEvent<'t> = {
83
+ ...event,
84
+ /**
85
+ Returns the data of the message.
86
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
87
+ */
88
+ data: 't,
89
+ /**
90
+ Returns the origin of the message, for server-sent events and cross-document messaging.
91
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MessageEvent/origin)
92
+ */
93
+ origin: string,
94
+ /**
95
+ Returns the last event ID string, for server-sent events.
96
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MessageEvent/lastEventId)
97
+ */
98
+ lastEventId: string,
99
+ /**
100
+ Returns the WindowProxy of the source window, for cross-document messaging, and the MessagePort being attached, in the connect event fired at SharedWorkerGlobalScope objects.
101
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MessageEvent/source)
102
+ */
103
+ source: Null.t<messageEventSource>,
104
+ /**
105
+ Returns the MessagePort array sent with the message, for cross-document messaging and channel messaging.
106
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MessageEvent/ports)
107
+ */
108
+ ports: array<messagePort>,
109
+ }
110
+
111
+ type closeEventInit = {
112
+ ...eventInit,
113
+ mutable wasClean?: bool,
114
+ mutable code?: int,
115
+ mutable reason?: string,
116
+ }
117
+
118
+ type messageEventInit<'t> = {
119
+ ...eventInit,
120
+ mutable data?: 't,
121
+ mutable origin?: string,
122
+ mutable lastEventId?: string,
123
+ mutable source?: Null.t<messageEventSource>,
124
+ mutable ports?: array<messagePort>,
125
+ }
@@ -0,0 +1,112 @@
1
+ open EventAPI
2
+ open WebSpeechAPI
3
+
4
+ external asEventTarget: speechSynthesis => 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
+ speechSynthesis,
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
+ speechSynthesis,
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
+ speechSynthesis,
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
+ speechSynthesis,
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: (speechSynthesis, event) => bool = "dispatchEvent"
83
+
84
+ /**
85
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesis/speak)
86
+ */
87
+ @send
88
+ external speak: (speechSynthesis, speechSynthesisUtterance) => unit = "speak"
89
+
90
+ /**
91
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesis/cancel)
92
+ */
93
+ @send
94
+ external cancel: speechSynthesis => unit = "cancel"
95
+
96
+ /**
97
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesis/pause)
98
+ */
99
+ @send
100
+ external pause: speechSynthesis => unit = "pause"
101
+
102
+ /**
103
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesis/resume)
104
+ */
105
+ @send
106
+ external resume: speechSynthesis => unit = "resume"
107
+
108
+ /**
109
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesis/getVoices)
110
+ */
111
+ @send
112
+ external getVoices: speechSynthesis => array<speechSynthesisVoice> = "getVoices"
@@ -0,0 +1,88 @@
1
+ open EventAPI
2
+ open WebSpeechAPI
3
+
4
+ /**
5
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesisUtterance)
6
+ */
7
+ @new
8
+ external make: (~text: string=?) => speechSynthesisUtterance = "SpeechSynthesisUtterance"
9
+
10
+ external asEventTarget: speechSynthesisUtterance => eventTarget = "%identity"
11
+ /**
12
+ 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.
13
+
14
+ 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.
15
+
16
+ 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.
17
+
18
+ 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.
19
+
20
+ When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
21
+
22
+ If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
23
+
24
+ The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
25
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
26
+ */
27
+ @send
28
+ external addEventListener: (
29
+ speechSynthesisUtterance,
30
+ ~type_: eventType,
31
+ ~callback: eventListener<'event>,
32
+ ~options: addEventListenerOptions=?,
33
+ ) => unit = "addEventListener"
34
+
35
+ /**
36
+ 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.
37
+
38
+ 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.
39
+
40
+ 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.
41
+
42
+ 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.
43
+
44
+ When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
45
+
46
+ If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
47
+
48
+ The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
49
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
50
+ */
51
+ @send
52
+ external addEventListener2: (
53
+ speechSynthesisUtterance,
54
+ ~type_: eventType,
55
+ ~callback: eventListener<'event>,
56
+ ~options: bool=?,
57
+ ) => unit = "addEventListener"
58
+
59
+ /**
60
+ Removes the event listener in target's event listener list with the same type, callback, and options.
61
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
62
+ */
63
+ @send
64
+ external removeEventListener: (
65
+ speechSynthesisUtterance,
66
+ ~type_: eventType,
67
+ ~callback: eventListener<'event>,
68
+ ~options: eventListenerOptions=?,
69
+ ) => unit = "removeEventListener"
70
+
71
+ /**
72
+ Removes the event listener in target's event listener list with the same type, callback, and options.
73
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
74
+ */
75
+ @send
76
+ external removeEventListener2: (
77
+ speechSynthesisUtterance,
78
+ ~type_: eventType,
79
+ ~callback: eventListener<'event>,
80
+ ~options: bool=?,
81
+ ) => unit = "removeEventListener"
82
+
83
+ /**
84
+ 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.
85
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
86
+ */
87
+ @send
88
+ external dispatchEvent: (speechSynthesisUtterance, event) => bool = "dispatchEvent"
@@ -0,0 +1,82 @@
1
+ @@warning("-30")
2
+
3
+ open EventAPI
4
+
5
+ /**
6
+ This Web Speech API interface is the controller interface for the speech service; this can be used to retrieve information about the synthesis voices available on the device, start and pause speech, and other commands besides.
7
+ [See SpeechSynthesis on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesis)
8
+ */
9
+ type speechSynthesis = {
10
+ ...eventTarget,
11
+ /**
12
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesis/pending)
13
+ */
14
+ pending: bool,
15
+ /**
16
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesis/speaking)
17
+ */
18
+ speaking: bool,
19
+ /**
20
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesis/paused)
21
+ */
22
+ paused: bool,
23
+ }
24
+
25
+ /**
26
+ This Web Speech API interface represents a voice that the system supports. Every SpeechSynthesisVoice has its own relative speech service including information about language, name and URI.
27
+ [See SpeechSynthesisVoice on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesisVoice)
28
+ */
29
+ type speechSynthesisVoice = {
30
+ /**
31
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesisVoice/voiceURI)
32
+ */
33
+ voiceURI: string,
34
+ /**
35
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesisVoice/name)
36
+ */
37
+ name: string,
38
+ /**
39
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesisVoice/lang)
40
+ */
41
+ lang: string,
42
+ /**
43
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesisVoice/localService)
44
+ */
45
+ localService: bool,
46
+ /**
47
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesisVoice/default)
48
+ */
49
+ default: bool,
50
+ }
51
+
52
+ /**
53
+ This Web Speech API interface represents a speech request. It contains the content the speech service should read and information about how to read it (e.g. language, pitch and volume.)
54
+ [See SpeechSynthesisUtterance on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesisUtterance)
55
+ */
56
+ type speechSynthesisUtterance = {
57
+ ...eventTarget,
58
+ /**
59
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesisUtterance/text)
60
+ */
61
+ mutable text: string,
62
+ /**
63
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesisUtterance/lang)
64
+ */
65
+ mutable lang: string,
66
+ /**
67
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesisUtterance/voice)
68
+ */
69
+ mutable voice: Null.t<speechSynthesisVoice>,
70
+ /**
71
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesisUtterance/volume)
72
+ */
73
+ mutable volume: float,
74
+ /**
75
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesisUtterance/rate)
76
+ */
77
+ mutable rate: float,
78
+ /**
79
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/SpeechSynthesisUtterance/pitch)
80
+ */
81
+ mutable pitch: float,
82
+ }
@@ -0,0 +1,44 @@
1
+ open WebStorageAPI
2
+
3
+ /**
4
+ Returns the name of the nth key, or null if n is greater than or equal to the number of key/value pairs.
5
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Storage/key)
6
+ */
7
+ @send
8
+ external key: (storage, int) => string = "key"
9
+
10
+ /**
11
+ Returns the current value associated with the given key, or null if the given key does not exist.
12
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Storage/getItem)
13
+ */
14
+ @send
15
+ external getItem: (storage, string) => string = "getItem"
16
+
17
+ /**
18
+ Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.
19
+
20
+ Throws a "QuotaExceededError" DOMException exception if the new value couldn't be set. (Setting could fail if, e.g., the user has disabled storage for the site, or if the quota has been exceeded.)
21
+
22
+ Dispatches a storage event on Window objects holding an equivalent Storage object.
23
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Storage/setItem)
24
+ */
25
+ @send
26
+ external setItem: (storage, ~key: string, ~value: string) => unit = "setItem"
27
+
28
+ /**
29
+ Removes the key/value pair with the given key, if a key/value pair with the given key exists.
30
+
31
+ Dispatches a storage event on Window objects holding an equivalent Storage object.
32
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Storage/removeItem)
33
+ */
34
+ @send
35
+ external removeItem: (storage, string) => unit = "removeItem"
36
+
37
+ /**
38
+ Removes all key/value pairs, if there are any.
39
+
40
+ Dispatches a storage event on Window objects holding an equivalent Storage object.
41
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Storage/clear)
42
+ */
43
+ @send
44
+ external clear: storage => unit = "clear"
@@ -0,0 +1,37 @@
1
+ open EventAPI
2
+ open WebStorageAPI
3
+
4
+ /**
5
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StorageEvent)
6
+ */
7
+ @new
8
+ external make: (~type_: string, ~eventInitDict: storageEventInit=?) => storageEvent = "StorageEvent"
9
+
10
+ external asEvent: storageEvent => event = "%identity"
11
+ /**
12
+ 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.
13
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Event/composedPath)
14
+ */
15
+ @send
16
+ external composedPath: storageEvent => array<eventTarget> = "composedPath"
17
+
18
+ /**
19
+ When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.
20
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)
21
+ */
22
+ @send
23
+ external stopPropagation: storageEvent => unit = "stopPropagation"
24
+
25
+ /**
26
+ 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.
27
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)
28
+ */
29
+ @send
30
+ external stopImmediatePropagation: storageEvent => unit = "stopImmediatePropagation"
31
+
32
+ /**
33
+ 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.
34
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)
35
+ */
36
+ @send
37
+ external preventDefault: storageEvent => unit = "preventDefault"
@@ -0,0 +1,57 @@
1
+ @@warning("-30")
2
+
3
+ open EventAPI
4
+
5
+ /**
6
+ This Web Storage API interface provides access to a particular domain's session or local storage. It allows, for example, the addition, modification, or deletion of stored data items.
7
+ [See Storage on MDN](https://developer.mozilla.org/docs/Web/API/Storage)
8
+ */
9
+ type storage = {
10
+ /**
11
+ Returns the number of key/value pairs.
12
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Storage/length)
13
+ */
14
+ length: int,
15
+ }
16
+
17
+ /**
18
+ A StorageEvent is sent to a window when a storage area it has access to is changed within the context of another document.
19
+ [See StorageEvent on MDN](https://developer.mozilla.org/docs/Web/API/StorageEvent)
20
+ */
21
+ type storageEvent = {
22
+ ...event,
23
+ /**
24
+ Returns the key of the storage item being changed.
25
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StorageEvent/key)
26
+ */
27
+ key: Null.t<string>,
28
+ /**
29
+ Returns the old value of the key of the storage item whose value is being changed.
30
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StorageEvent/oldValue)
31
+ */
32
+ oldValue: Null.t<string>,
33
+ /**
34
+ Returns the new value of the key of the storage item whose value is being changed.
35
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StorageEvent/newValue)
36
+ */
37
+ newValue: Null.t<string>,
38
+ /**
39
+ Returns the URL of the document whose storage item changed.
40
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StorageEvent/url)
41
+ */
42
+ url: string,
43
+ /**
44
+ Returns the Storage object that was affected.
45
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/StorageEvent/storageArea)
46
+ */
47
+ storageArea: Null.t<storage>,
48
+ }
49
+
50
+ type storageEventInit = {
51
+ ...eventInit,
52
+ mutable key?: Null.t<string>,
53
+ mutable oldValue?: Null.t<string>,
54
+ mutable newValue?: Null.t<string>,
55
+ mutable url?: string,
56
+ mutable storageArea?: Null.t<storage>,
57
+ }
@@ -0,0 +1,96 @@
1
+ open EventAPI
2
+ open WebVTTAPI
3
+
4
+ external asEventTarget: textTrack => 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
+ textTrack,
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
+ textTrack,
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
+ textTrack,
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
+ textTrack,
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: (textTrack, event) => bool = "dispatchEvent"
83
+
84
+ /**
85
+ Adds the given cue to textTrack's text track list of cues.
86
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/TextTrack/addCue)
87
+ */
88
+ @send
89
+ external addCue: (textTrack, textTrackCue) => unit = "addCue"
90
+
91
+ /**
92
+ Removes the given cue from textTrack's text track list of cues.
93
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/TextTrack/removeCue)
94
+ */
95
+ @send
96
+ external removeCue: (textTrack, textTrackCue) => unit = "removeCue"
@@ -0,0 +1,10 @@
1
+ open WebVTTAPI
2
+
3
+ /**
4
+ Returns the first text track cue (in text track cue order) with text track cue identifier id.
5
+
6
+ Returns null if none of the cues have the given identifier or if the argument is the empty string.
7
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/TextTrackCueList/getCueById)
8
+ */
9
+ @send
10
+ external getCueById: (textTrackCueList, string) => textTrackCue = "getCueById"