@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,686 +1,5 @@
1
1
  open DOMAPI
2
- open Prelude
3
- open EventAPI
4
2
 
5
- external asHTMLElement: htmlMapElement => htmlElement = "%identity"
6
- external asElement: htmlMapElement => element = "%identity"
7
- external asNode: htmlMapElement => node = "%identity"
8
- external asEventTarget: htmlMapElement => eventTarget = "%identity"
9
- /**
10
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/focus)
11
- */
12
- @send
13
- external focus: (htmlMapElement, ~options: focusOptions=?) => unit = "focus"
14
-
15
- /**
16
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/blur)
17
- */
18
- @send
19
- external blur: htmlMapElement => unit = "blur"
20
-
21
- /**
22
- Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes.
23
-
24
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
25
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/prepend)
26
- */
27
- @send
28
- external prepend: (htmlMapElement, node) => unit = "prepend"
29
-
30
- /**
31
- Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes.
32
-
33
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
34
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/prepend)
35
- */
36
- @send
37
- external prepend2: (htmlMapElement, string) => unit = "prepend"
38
-
39
- /**
40
- Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.
41
-
42
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
43
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/append)
44
- */
45
- @send
46
- external append: (htmlMapElement, node) => unit = "append"
47
-
48
- /**
49
- Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.
50
-
51
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
52
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/append)
53
- */
54
- @send
55
- external append2: (htmlMapElement, string) => unit = "append"
56
-
57
- /**
58
- Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes.
59
-
60
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
61
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/replaceChildren)
62
- */
63
- @send
64
- external replaceChildren: (htmlMapElement, node) => unit = "replaceChildren"
65
-
66
- /**
67
- Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes.
68
-
69
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
70
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/replaceChildren)
71
- */
72
- @send
73
- external replaceChildren2: (htmlMapElement, string) => unit = "replaceChildren"
74
-
75
- /**
76
- Returns the first element that is a descendant of node that matches selectors.
77
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/querySelector)
78
- */
79
- @send
80
- external querySelector: (htmlMapElement, string) => element = "querySelector"
81
-
82
- /**
83
- Returns all element descendants of node that match selectors.
84
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/querySelectorAll)
85
- */
86
- @send
87
- external querySelectorAll: (htmlMapElement, string) => nodeList = "querySelectorAll"
88
-
89
- /**
90
- Inserts nodes just before node, while replacing strings in nodes with equivalent Text nodes.
91
-
92
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
93
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/before)
94
- */
95
- @send
96
- external before: (htmlMapElement, node) => unit = "before"
97
-
98
- /**
99
- Inserts nodes just before node, while replacing strings in nodes with equivalent Text nodes.
100
-
101
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
102
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/before)
103
- */
104
- @send
105
- external before2: (htmlMapElement, string) => unit = "before"
106
-
107
- /**
108
- Inserts nodes just after node, while replacing strings in nodes with equivalent Text nodes.
109
-
110
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
111
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/after)
112
- */
113
- @send
114
- external after: (htmlMapElement, node) => unit = "after"
115
-
116
- /**
117
- Inserts nodes just after node, while replacing strings in nodes with equivalent Text nodes.
118
-
119
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
120
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/after)
121
- */
122
- @send
123
- external after2: (htmlMapElement, string) => unit = "after"
124
-
125
- /**
126
- Replaces node with nodes, while replacing strings in nodes with equivalent Text nodes.
127
-
128
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
129
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/replaceWith)
130
- */
131
- @send
132
- external replaceWith: (htmlMapElement, node) => unit = "replaceWith"
133
-
134
- /**
135
- Replaces node with nodes, while replacing strings in nodes with equivalent Text nodes.
136
-
137
- Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
138
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/replaceWith)
139
- */
140
- @send
141
- external replaceWith2: (htmlMapElement, string) => unit = "replaceWith"
142
-
143
- /**
144
- Removes node.
145
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/CharacterData/remove)
146
- */
147
- @send
148
- external remove: htmlMapElement => unit = "remove"
149
-
150
- /**
151
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/animate)
152
- */
153
- @send
154
- external animate: (htmlMapElement, ~keyframes: any, ~options: float=?) => animation = "animate"
155
-
156
- /**
157
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/animate)
158
- */
159
- @send
160
- external animate2: (
161
- htmlMapElement,
162
- ~keyframes: any,
163
- ~options: keyframeAnimationOptions=?,
164
- ) => animation = "animate"
165
-
166
- /**
167
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAnimations)
168
- */
169
- @send
170
- external getAnimations: (htmlMapElement, ~options: getAnimationsOptions=?) => array<animation> =
171
- "getAnimations"
172
-
173
- /**
174
- 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.
175
-
176
- 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.
177
-
178
- 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.
179
-
180
- 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.
181
-
182
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
183
-
184
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
185
-
186
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
187
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
188
- */
189
- @send
190
- external addEventListener: (
191
- htmlMapElement,
192
- ~type_: eventType,
193
- ~callback: eventListener<'event>,
194
- ~options: addEventListenerOptions=?,
195
- ) => unit = "addEventListener"
196
-
197
- /**
198
- 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.
199
-
200
- 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.
201
-
202
- 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.
203
-
204
- 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.
205
-
206
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
207
-
208
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
209
-
210
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
211
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
212
- */
213
- @send
214
- external addEventListener2: (
215
- htmlMapElement,
216
- ~type_: eventType,
217
- ~callback: eventListener<'event>,
218
- ~options: bool=?,
219
- ) => unit = "addEventListener"
220
-
221
- /**
222
- Removes the event listener in target's event listener list with the same type, callback, and options.
223
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
224
- */
225
- @send
226
- external removeEventListener: (
227
- htmlMapElement,
228
- ~type_: eventType,
229
- ~callback: eventListener<'event>,
230
- ~options: eventListenerOptions=?,
231
- ) => unit = "removeEventListener"
232
-
233
- /**
234
- Removes the event listener in target's event listener list with the same type, callback, and options.
235
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
236
- */
237
- @send
238
- external removeEventListener2: (
239
- htmlMapElement,
240
- ~type_: eventType,
241
- ~callback: eventListener<'event>,
242
- ~options: bool=?,
243
- ) => unit = "removeEventListener"
244
-
245
- /**
246
- 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.
247
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
248
- */
249
- @send
250
- external dispatchEvent: (htmlMapElement, event) => bool = "dispatchEvent"
251
-
252
- /**
253
- Returns node's root.
254
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/getRootNode)
255
- */
256
- @send
257
- external getRootNode: (htmlMapElement, ~options: getRootNodeOptions=?) => node = "getRootNode"
258
-
259
- /**
260
- Returns whether node has children.
261
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/hasChildNodes)
262
- */
263
- @send
264
- external hasChildNodes: htmlMapElement => bool = "hasChildNodes"
265
-
266
- /**
267
- Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.
268
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/normalize)
269
- */
270
- @send
271
- external normalize: htmlMapElement => unit = "normalize"
272
-
273
- /**
274
- Returns a copy of node. If deep is true, the copy also includes the node's descendants.
275
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/cloneNode)
276
- */
277
- @send
278
- external cloneNode: (htmlMapElement, ~deep: bool=?) => node = "cloneNode"
279
-
280
- /**
281
- Returns whether node and otherNode have the same properties.
282
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isEqualNode)
283
- */
284
- @send
285
- external isEqualNode: (htmlMapElement, node) => bool = "isEqualNode"
286
-
287
- /**
288
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isSameNode)
289
- */
290
- @send
291
- external isSameNode: (htmlMapElement, node) => bool = "isSameNode"
292
-
293
- /**
294
- Returns a bitmask indicating the position of other relative to node.
295
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/compareDocumentPosition)
296
- */
297
- @send
298
- external compareDocumentPosition: (htmlMapElement, node) => int = "compareDocumentPosition"
299
-
300
- /**
301
- Returns true if other is an inclusive descendant of node, and false otherwise.
302
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/contains)
303
- */
304
- @send
305
- external contains: (htmlMapElement, node) => bool = "contains"
306
-
307
- /**
308
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lookupPrefix)
309
- */
310
- @send
311
- external lookupPrefix: (htmlMapElement, string) => string = "lookupPrefix"
312
-
313
- /**
314
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lookupNamespaceURI)
315
- */
316
- @send
317
- external lookupNamespaceURI: (htmlMapElement, string) => string = "lookupNamespaceURI"
318
-
319
- /**
320
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isDefaultNamespace)
321
- */
322
- @send
323
- external isDefaultNamespace: (htmlMapElement, string) => bool = "isDefaultNamespace"
324
-
325
- /**
326
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/insertBefore)
327
- */
328
- @send
329
- external insertBefore: (htmlMapElement, 't, ~child: node) => 't = "insertBefore"
330
-
331
- /**
332
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/appendChild)
333
- */
334
- @send
335
- external appendChild: (htmlMapElement, 't) => 't = "appendChild"
336
-
337
- /**
338
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/replaceChild)
339
- */
340
- @send
341
- external replaceChild: (htmlMapElement, ~node: node, 't) => 't = "replaceChild"
342
-
343
- /**
344
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/removeChild)
345
- */
346
- @send
347
- external removeChild: (htmlMapElement, 't) => 't = "removeChild"
348
-
349
- /**
350
- Returns true if element has attributes, and false otherwise.
351
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/hasAttributes)
352
- */
353
- @send
354
- external hasAttributes: htmlMapElement => bool = "hasAttributes"
355
-
356
- /**
357
- Returns the qualified names of all element's attributes. Can contain duplicates.
358
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNames)
359
- */
360
- @send
361
- external getAttributeNames: htmlMapElement => array<string> = "getAttributeNames"
362
-
363
- /**
364
- Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise.
365
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAttribute)
366
- */
367
- @send
368
- external getAttribute: (htmlMapElement, string) => string = "getAttribute"
369
-
370
- /**
371
- Returns element's attribute whose namespace is namespace and local name is localName, and null if there is no such attribute otherwise.
372
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNS)
373
- */
374
- @send
375
- external getAttributeNS: (htmlMapElement, ~namespace: string, ~localName: string) => string =
376
- "getAttributeNS"
377
-
378
- /**
379
- Sets the value of element's first attribute whose qualified name is qualifiedName to value.
380
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setAttribute)
381
- */
382
- @send
383
- external setAttribute: (htmlMapElement, ~qualifiedName: string, ~value: string) => unit =
384
- "setAttribute"
385
-
386
- /**
387
- Sets the value of element's attribute whose namespace is namespace and local name is localName to value.
388
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNS)
389
- */
390
- @send
391
- external setAttributeNS: (
392
- htmlMapElement,
393
- ~namespace: string,
394
- ~qualifiedName: string,
395
- ~value: string,
396
- ) => unit = "setAttributeNS"
397
-
398
- /**
399
- Removes element's first attribute whose qualified name is qualifiedName.
400
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/removeAttribute)
401
- */
402
- @send
403
- external removeAttribute: (htmlMapElement, string) => unit = "removeAttribute"
404
-
405
- /**
406
- Removes element's attribute whose namespace is namespace and local name is localName.
407
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/removeAttributeNS)
408
- */
409
- @send
410
- external removeAttributeNS: (htmlMapElement, ~namespace: string, ~localName: string) => unit =
411
- "removeAttributeNS"
412
-
413
- /**
414
- If force is not given, "toggles" qualifiedName, removing it if it is present and adding it if it is not present. If force is true, adds qualifiedName. If force is false, removes qualifiedName.
415
-
416
- Returns true if qualifiedName is now present, and false otherwise.
417
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/toggleAttribute)
418
- */
419
- @send
420
- external toggleAttribute: (htmlMapElement, ~qualifiedName: string, ~force: bool=?) => bool =
421
- "toggleAttribute"
422
-
423
- /**
424
- Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise.
425
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/hasAttribute)
426
- */
427
- @send
428
- external hasAttribute: (htmlMapElement, string) => bool = "hasAttribute"
429
-
430
- /**
431
- Returns true if element has an attribute whose namespace is namespace and local name is localName.
432
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/hasAttributeNS)
433
- */
434
- @send
435
- external hasAttributeNS: (htmlMapElement, ~namespace: string, ~localName: string) => bool =
436
- "hasAttributeNS"
437
-
438
- /**
439
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNode)
440
- */
441
- @send
442
- external getAttributeNode: (htmlMapElement, string) => attr = "getAttributeNode"
443
-
444
- /**
445
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNodeNS)
446
- */
447
- @send
448
- external getAttributeNodeNS: (htmlMapElement, ~namespace: string, ~localName: string) => attr =
449
- "getAttributeNodeNS"
450
-
451
- /**
452
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNode)
453
- */
454
- @send
455
- external setAttributeNode: (htmlMapElement, attr) => attr = "setAttributeNode"
456
-
457
- /**
458
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNodeNS)
459
- */
460
- @send
461
- external setAttributeNodeNS: (htmlMapElement, attr) => attr = "setAttributeNodeNS"
462
-
463
- /**
464
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/removeAttributeNode)
465
- */
466
- @send
467
- external removeAttributeNode: (htmlMapElement, attr) => attr = "removeAttributeNode"
468
-
469
- /**
470
- Creates a shadow root for element and returns it.
471
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/attachShadow)
472
- */
473
- @send
474
- external attachShadow: (htmlMapElement, shadowRootInit) => shadowRoot = "attachShadow"
475
-
476
- /**
477
- Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise.
478
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/closest)
479
- */
480
- @send
481
- external closest: (htmlMapElement, string) => 'e = "closest"
482
-
483
- /**
484
- Returns true if matching selectors against element's root yields element, and false otherwise.
485
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/matches)
486
- */
487
- @send
488
- external matches: (htmlMapElement, string) => bool = "matches"
489
-
490
- /**
491
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getElementsByTagName)
492
- */
493
- @send
494
- external getElementsByTagName: (htmlMapElement, string) => htmlCollection = "getElementsByTagName"
495
-
496
- /**
497
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getElementsByTagNameNS)
498
- */
499
- @send
500
- external getElementsByTagNameNS: (
501
- htmlMapElement,
502
- ~namespace: string,
503
- ~localName: string,
504
- ) => htmlCollectionOf<element> = "getElementsByTagNameNS"
505
-
506
- /**
507
- Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.
508
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getElementsByClassName)
509
- */
510
- @send
511
- external getElementsByClassName: (htmlMapElement, string) => htmlCollectionOf<element> =
512
- "getElementsByClassName"
513
-
514
- /**
515
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentElement)
516
- */
517
- @send
518
- external insertAdjacentElement: (
519
- htmlMapElement,
520
- ~where: insertPosition,
521
- ~element: element,
522
- ) => element = "insertAdjacentElement"
523
-
524
- /**
525
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentText)
526
- */
527
- @send
528
- external insertAdjacentText: (htmlMapElement, ~where: insertPosition, ~data: string) => unit =
529
- "insertAdjacentText"
530
-
531
- /**
532
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/computedStyleMap)
533
- */
534
- @send
535
- external computedStyleMap: htmlMapElement => stylePropertyMapReadOnly = "computedStyleMap"
536
-
537
- /**
538
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getClientRects)
539
- */
540
- @send
541
- external getClientRects: htmlMapElement => domRectList = "getClientRects"
542
-
543
- /**
544
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getBoundingClientRect)
545
- */
546
- @send
547
- external getBoundingClientRect: htmlMapElement => domRect = "getBoundingClientRect"
548
-
549
- /**
550
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/checkVisibility)
551
- */
552
- @send
553
- external checkVisibility: (htmlMapElement, ~options: checkVisibilityOptions=?) => bool =
554
- "checkVisibility"
555
-
556
- /**
557
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollIntoView)
558
- */
559
- @send
560
- external scrollIntoView: (htmlMapElement, ~arg: bool=?) => unit = "scrollIntoView"
561
-
562
- /**
563
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollIntoView)
564
- */
565
- @send
566
- external scrollIntoView2: (htmlMapElement, ~arg: scrollIntoViewOptions=?) => unit = "scrollIntoView"
567
-
568
- /**
569
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scroll)
570
- */
571
- @send
572
- external scroll: (htmlMapElement, ~options: scrollToOptions=?) => unit = "scroll"
573
-
574
- /**
575
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scroll)
576
- */
577
- @send
578
- external scroll2: (htmlMapElement, ~x: float, ~y: float) => unit = "scroll"
579
-
580
- /**
581
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTo)
582
- */
583
- @send
584
- external scrollTo: (htmlMapElement, ~options: scrollToOptions=?) => unit = "scrollTo"
585
-
586
- /**
587
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTo)
588
- */
589
- @send
590
- external scrollTo2: (htmlMapElement, ~x: float, ~y: float) => unit = "scrollTo"
591
-
592
- /**
593
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollBy)
594
- */
595
- @send
596
- external scrollBy: (htmlMapElement, ~options: scrollToOptions=?) => unit = "scrollBy"
597
-
598
- /**
599
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollBy)
600
- */
601
- @send
602
- external scrollBy2: (htmlMapElement, ~x: float, ~y: float) => unit = "scrollBy"
603
-
604
- /**
605
- Displays element fullscreen and resolves promise when done.
606
-
607
- When supplied, options's navigationUI member indicates whether showing navigation UI while in fullscreen is preferred or not. If set to "show", navigation simplicity is preferred over screen space, and if set to "hide", more screen space is preferred. User agents are always free to honor user preference over the application's. The default value "auto" indicates no application preference.
608
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/requestFullscreen)
609
- */
610
- @send
611
- external requestFullscreen: (htmlMapElement, ~options: fullscreenOptions=?) => Promise.t<unit> =
612
- "requestFullscreen"
613
-
614
- /**
615
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setHTMLUnsafe)
616
- */
617
- @send
618
- external setHTMLUnsafe: (htmlMapElement, string) => unit = "setHTMLUnsafe"
619
-
620
- /**
621
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getHTML)
622
- */
623
- @send
624
- external getHTML: (htmlMapElement, ~options: getHTMLOptions=?) => string = "getHTML"
625
-
626
- /**
627
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentHTML)
628
- */
629
- @send
630
- external insertAdjacentHTML: (htmlMapElement, ~position: insertPosition, ~string: string) => unit =
631
- "insertAdjacentHTML"
632
-
633
- /**
634
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setPointerCapture)
635
- */
636
- @send
637
- external setPointerCapture: (htmlMapElement, int) => unit = "setPointerCapture"
638
-
639
- /**
640
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/releasePointerCapture)
641
- */
642
- @send
643
- external releasePointerCapture: (htmlMapElement, int) => unit = "releasePointerCapture"
644
-
645
- /**
646
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/hasPointerCapture)
647
- */
648
- @send
649
- external hasPointerCapture: (htmlMapElement, int) => bool = "hasPointerCapture"
650
-
651
- /**
652
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/requestPointerLock)
653
- */
654
- @send
655
- external requestPointerLock: (htmlMapElement, ~options: pointerLockOptions=?) => Promise.t<unit> =
656
- "requestPointerLock"
657
-
658
- /**
659
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/click)
660
- */
661
- @send
662
- external click: htmlMapElement => unit = "click"
663
-
664
- /**
665
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/attachInternals)
666
- */
667
- @send
668
- external attachInternals: htmlMapElement => elementInternals = "attachInternals"
669
-
670
- /**
671
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/showPopover)
672
- */
673
- @send
674
- external showPopover: htmlMapElement => unit = "showPopover"
675
-
676
- /**
677
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/hidePopover)
678
- */
679
- @send
680
- external hidePopover: htmlMapElement => unit = "hidePopover"
681
-
682
- /**
683
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/togglePopover)
684
- */
685
- @send
686
- external togglePopover: (htmlMapElement, ~force: bool=?) => bool = "togglePopover"
3
+ include HTMLElement.Impl({
4
+ type t = htmlMapElement
5
+ })