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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/package.json +1 -1
  2. package/src/CSSFontLoadingAPI/FontFaceSet.res +3 -79
  3. package/src/CanvasAPI/OffscreenCanvas.res +3 -79
  4. package/src/ChannelMessagingAPI/MessagePort.res +3 -81
  5. package/src/ClipboardAPI/Clipboard.res +3 -80
  6. package/src/DOMAPI/Animation.res +3 -80
  7. package/src/DOMAPI/CharacterData.res +68 -231
  8. package/src/DOMAPI/Comment.res +4 -271
  9. package/src/DOMAPI/Document.res +4 -178
  10. package/src/DOMAPI/DocumentFragment.res +58 -220
  11. package/src/DOMAPI/Element.res +313 -477
  12. package/src/DOMAPI/HTMLAnchorElement.res +3 -691
  13. package/src/DOMAPI/HTMLAreaElement.res +3 -685
  14. package/src/DOMAPI/HTMLAudioElement.res +3 -748
  15. package/src/DOMAPI/HTMLBRElement.res +3 -684
  16. package/src/DOMAPI/HTMLBaseElement.res +3 -685
  17. package/src/DOMAPI/HTMLBodyElement.res +3 -685
  18. package/src/DOMAPI/HTMLButtonElement.res +3 -691
  19. package/src/DOMAPI/HTMLCanvasElement.res +3 -691
  20. package/src/DOMAPI/HTMLDListElement.res +3 -688
  21. package/src/DOMAPI/HTMLDataElement.res +3 -685
  22. package/src/DOMAPI/HTMLDataListElement.res +3 -695
  23. package/src/DOMAPI/HTMLDialogElement.res +3 -691
  24. package/src/DOMAPI/HTMLDivElement.res +3 -684
  25. package/src/DOMAPI/HTMLElement.res +40 -666
  26. package/src/DOMAPI/HTMLEmbedElement.res +3 -688
  27. package/src/DOMAPI/HTMLFieldSetElement.res +3 -695
  28. package/src/DOMAPI/HTMLFormElement.res +3 -685
  29. package/src/DOMAPI/HTMLFrameSetElement.res +3 -695
  30. package/src/DOMAPI/HTMLHRElement.res +3 -684
  31. package/src/DOMAPI/HTMLHeadElement.res +3 -685
  32. package/src/DOMAPI/HTMLHeadingElement.res +3 -691
  33. package/src/DOMAPI/HTMLHtmlElement.res +3 -685
  34. package/src/DOMAPI/HTMLIFrameElement.res +3 -691
  35. package/src/DOMAPI/HTMLImageElement.res +3 -688
  36. package/src/DOMAPI/HTMLInputElement.res +3 -688
  37. package/src/DOMAPI/HTMLLIElement.res +3 -684
  38. package/src/DOMAPI/HTMLLabelElement.res +3 -688
  39. package/src/DOMAPI/HTMLLegendElement.res +3 -691
  40. package/src/DOMAPI/HTMLLinkElement.res +3 -685
  41. package/src/DOMAPI/HTMLMapElement.res +3 -684
  42. package/src/DOMAPI/HTMLMediaElement.res +49 -722
  43. package/src/DOMAPI/HTMLMenuElement.res +3 -685
  44. package/src/DOMAPI/HTMLMetaElement.res +3 -685
  45. package/src/DOMAPI/HTMLMeterElement.res +3 -688
  46. package/src/DOMAPI/HTMLModElement.res +3 -684
  47. package/src/DOMAPI/HTMLOListElement.res +3 -688
  48. package/src/DOMAPI/HTMLObjectElement.res +3 -691
  49. package/src/DOMAPI/HTMLOptGroupElement.res +3 -695
  50. package/src/DOMAPI/HTMLOptionElement.res +3 -691
  51. package/src/DOMAPI/HTMLOutputElement.res +3 -691
  52. package/src/DOMAPI/HTMLParagraphElement.res +3 -699
  53. package/src/DOMAPI/HTMLPictureElement.res +3 -691
  54. package/src/DOMAPI/HTMLPreElement.res +3 -684
  55. package/src/DOMAPI/HTMLProgressElement.res +3 -695
  56. package/src/DOMAPI/HTMLQuoteElement.res +3 -688
  57. package/src/DOMAPI/HTMLScriptElement.res +3 -691
  58. package/src/DOMAPI/HTMLSelectElement.res +4 -692
  59. package/src/DOMAPI/HTMLSlotElement.res +3 -685
  60. package/src/DOMAPI/HTMLSourceElement.res +3 -691
  61. package/src/DOMAPI/HTMLSpanElement.res +3 -685
  62. package/src/DOMAPI/HTMLStyleElement.res +3 -688
  63. package/src/DOMAPI/HTMLTableCaptionElement.res +3 -712
  64. package/src/DOMAPI/HTMLTableCellElement.res +3 -699
  65. package/src/DOMAPI/HTMLTableElement.res +3 -688
  66. package/src/DOMAPI/HTMLTableRowElement.res +3 -695
  67. package/src/DOMAPI/HTMLTableSectionElement.res +3 -712
  68. package/src/DOMAPI/HTMLTemplateElement.res +3 -695
  69. package/src/DOMAPI/HTMLTextAreaElement.res +3 -695
  70. package/src/DOMAPI/HTMLTimeElement.res +3 -685
  71. package/src/DOMAPI/HTMLTitleElement.res +3 -688
  72. package/src/DOMAPI/HTMLTrackElement.res +3 -688
  73. package/src/DOMAPI/HTMLUListElement.res +3 -688
  74. package/src/DOMAPI/HTMLVideoElement.res +3 -748
  75. package/src/DOMAPI/MediaQueryList.res +3 -80
  76. package/src/DOMAPI/Node.res +59 -124
  77. package/src/DOMAPI/SVGGraphicsElement.res +4 -660
  78. package/src/DOMAPI/ScreenOrientation.res +3 -79
  79. package/src/DOMAPI/ShadowRoot.res +4 -255
  80. package/src/DOMAPI/Text.res +4 -271
  81. package/src/DOMAPI/TextTrackList.res +3 -79
  82. package/src/DOMAPI/Window.res +4 -80
  83. package/src/EncryptedMediaExtensionsAPI/MediaKeySession.res +3 -80
  84. package/src/EventAPI/AbortSignal.res +3 -80
  85. package/src/EventAPI/Event.res +28 -16
  86. package/src/EventAPI/EventTarget.res +51 -39
  87. package/src/FileAPI/Blob.res +26 -15
  88. package/src/FileAPI/File.res +4 -31
  89. package/src/IndexedDBAPI/IDBDatabase.res +3 -79
  90. package/src/IndexedDBAPI/IDBTransaction.res +3 -80
  91. package/src/MediaCaptureAndStreamsAPI/MediaDevices.res +3 -79
  92. package/src/MediaCaptureAndStreamsAPI/MediaStream.res +3 -80
  93. package/src/MediaCaptureAndStreamsAPI/MediaStreamTrack.res +3 -81
  94. package/src/NotificationAPI/Notification.res +3 -80
  95. package/src/PerformanceAPI/Performance.res +3 -79
  96. package/src/RemotePlaybackAPI/RemotePlayback.res +3 -80
  97. package/src/ScreenWakeLockAPI/WakeLockSentinel.res +3 -79
  98. package/src/ServiceWorkerAPI/ServiceWorker.res +3 -79
  99. package/src/ServiceWorkerAPI/ServiceWorkerContainer.res +3 -79
  100. package/src/ServiceWorkerAPI/ServiceWorkerRegistration.res +3 -79
  101. package/src/WebAudioAPI/AnalyserNode.res +4 -148
  102. package/src/WebAudioAPI/AudioBufferSourceNode.res +4 -162
  103. package/src/WebAudioAPI/AudioContext.res +4 -212
  104. package/src/WebAudioAPI/AudioNode.res +39 -113
  105. package/src/WebAudioAPI/AudioProcessingEvent.res +4 -30
  106. package/src/WebAudioAPI/AudioScheduledSourceNode.res +20 -162
  107. package/src/WebAudioAPI/AudioWorkletNode.res +4 -149
  108. package/src/WebAudioAPI/BaseAudioContext.res +85 -155
  109. package/src/WebAudioAPI/BiquadFilterNode.res +4 -149
  110. package/src/WebAudioAPI/ChannelMergerNode.res +4 -149
  111. package/src/WebAudioAPI/ChannelSplitterNode.res +4 -149
  112. package/src/WebAudioAPI/ConstantSourceNode.res +4 -162
  113. package/src/WebAudioAPI/ConvolverNode.res +4 -149
  114. package/src/WebAudioAPI/DelayNode.res +4 -143
  115. package/src/WebAudioAPI/DynamicsCompressorNode.res +4 -152
  116. package/src/WebAudioAPI/GainNode.res +4 -142
  117. package/src/WebAudioAPI/IIRFilterNode.res +4 -149
  118. package/src/WebAudioAPI/MediaElementAudioSourceNode.res +4 -158
  119. package/src/WebAudioAPI/MediaStreamAudioDestinationNode.res +4 -158
  120. package/src/WebAudioAPI/MediaStreamAudioSourceNode.res +4 -158
  121. package/src/WebAudioAPI/OfflineAudioCompletionEvent.res +4 -30
  122. package/src/WebAudioAPI/OfflineAudioContext.res +4 -214
  123. package/src/WebAudioAPI/OscillatorNode.res +4 -162
  124. package/src/WebAudioAPI/PannerNode.res +4 -143
  125. package/src/WebAudioAPI/StereoPannerNode.res +4 -149
  126. package/src/WebAudioAPI/WaveShaperNode.res +4 -149
  127. package/src/WebSocketsAPI/CloseEvent.res +4 -30
  128. package/src/WebSocketsAPI/WebSocket.res +3 -79
  129. package/src/WebSpeechAPI/SpeechSynthesis.res +3 -79
  130. package/src/WebSpeechAPI/SpeechSynthesisUtterance.res +4 -81
  131. package/src/WebStorageAPI/StorageEvent.res +4 -30
  132. package/src/WebVTTAPI/TextTrack.res +3 -79
@@ -1,701 +1,5 @@
1
1
  open DOMAPI
2
- open Prelude
3
- open EventAPI
4
2
 
5
- external asHTMLElement: htmlParagraphElement => htmlElement = "%identity"
6
- external asElement: htmlParagraphElement => element = "%identity"
7
- external asNode: htmlParagraphElement => node = "%identity"
8
- external asEventTarget: htmlParagraphElement => eventTarget = "%identity"
9
- /**
10
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/focus)
11
- */
12
- @send
13
- external focus: (htmlParagraphElement, ~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: htmlParagraphElement => 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: (htmlParagraphElement, 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: (htmlParagraphElement, 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: (htmlParagraphElement, 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: (htmlParagraphElement, 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: (htmlParagraphElement, 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: (htmlParagraphElement, 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: (htmlParagraphElement, 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: (htmlParagraphElement, 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: (htmlParagraphElement, 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: (htmlParagraphElement, 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: (htmlParagraphElement, 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: (htmlParagraphElement, 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: (htmlParagraphElement, 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: (htmlParagraphElement, 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: htmlParagraphElement => unit = "remove"
149
-
150
- /**
151
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/animate)
152
- */
153
- @send
154
- external animate: (htmlParagraphElement, ~keyframes: any, ~options: float=?) => animation =
155
- "animate"
156
-
157
- /**
158
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/animate)
159
- */
160
- @send
161
- external animate2: (
162
- htmlParagraphElement,
163
- ~keyframes: any,
164
- ~options: keyframeAnimationOptions=?,
165
- ) => animation = "animate"
166
-
167
- /**
168
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAnimations)
169
- */
170
- @send
171
- external getAnimations: (
172
- htmlParagraphElement,
173
- ~options: getAnimationsOptions=?,
174
- ) => array<animation> = "getAnimations"
175
-
176
- /**
177
- 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.
178
-
179
- 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.
180
-
181
- 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.
182
-
183
- 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.
184
-
185
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
186
-
187
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
188
-
189
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
190
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
191
- */
192
- @send
193
- external addEventListener: (
194
- htmlParagraphElement,
195
- ~type_: eventType,
196
- ~callback: eventListener<'event>,
197
- ~options: addEventListenerOptions=?,
198
- ) => unit = "addEventListener"
199
-
200
- /**
201
- 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.
202
-
203
- 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.
204
-
205
- 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.
206
-
207
- 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.
208
-
209
- When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
210
-
211
- If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
212
-
213
- The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
214
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
215
- */
216
- @send
217
- external addEventListener2: (
218
- htmlParagraphElement,
219
- ~type_: eventType,
220
- ~callback: eventListener<'event>,
221
- ~options: bool=?,
222
- ) => unit = "addEventListener"
223
-
224
- /**
225
- Removes the event listener in target's event listener list with the same type, callback, and options.
226
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
227
- */
228
- @send
229
- external removeEventListener: (
230
- htmlParagraphElement,
231
- ~type_: eventType,
232
- ~callback: eventListener<'event>,
233
- ~options: eventListenerOptions=?,
234
- ) => unit = "removeEventListener"
235
-
236
- /**
237
- Removes the event listener in target's event listener list with the same type, callback, and options.
238
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
239
- */
240
- @send
241
- external removeEventListener2: (
242
- htmlParagraphElement,
243
- ~type_: eventType,
244
- ~callback: eventListener<'event>,
245
- ~options: bool=?,
246
- ) => unit = "removeEventListener"
247
-
248
- /**
249
- 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.
250
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
251
- */
252
- @send
253
- external dispatchEvent: (htmlParagraphElement, event) => bool = "dispatchEvent"
254
-
255
- /**
256
- Returns node's root.
257
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/getRootNode)
258
- */
259
- @send
260
- external getRootNode: (htmlParagraphElement, ~options: getRootNodeOptions=?) => node = "getRootNode"
261
-
262
- /**
263
- Returns whether node has children.
264
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/hasChildNodes)
265
- */
266
- @send
267
- external hasChildNodes: htmlParagraphElement => bool = "hasChildNodes"
268
-
269
- /**
270
- Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.
271
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/normalize)
272
- */
273
- @send
274
- external normalize: htmlParagraphElement => unit = "normalize"
275
-
276
- /**
277
- Returns a copy of node. If deep is true, the copy also includes the node's descendants.
278
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/cloneNode)
279
- */
280
- @send
281
- external cloneNode: (htmlParagraphElement, ~deep: bool=?) => node = "cloneNode"
282
-
283
- /**
284
- Returns whether node and otherNode have the same properties.
285
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isEqualNode)
286
- */
287
- @send
288
- external isEqualNode: (htmlParagraphElement, node) => bool = "isEqualNode"
289
-
290
- /**
291
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isSameNode)
292
- */
293
- @send
294
- external isSameNode: (htmlParagraphElement, node) => bool = "isSameNode"
295
-
296
- /**
297
- Returns a bitmask indicating the position of other relative to node.
298
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/compareDocumentPosition)
299
- */
300
- @send
301
- external compareDocumentPosition: (htmlParagraphElement, node) => int = "compareDocumentPosition"
302
-
303
- /**
304
- Returns true if other is an inclusive descendant of node, and false otherwise.
305
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/contains)
306
- */
307
- @send
308
- external contains: (htmlParagraphElement, node) => bool = "contains"
309
-
310
- /**
311
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lookupPrefix)
312
- */
313
- @send
314
- external lookupPrefix: (htmlParagraphElement, string) => string = "lookupPrefix"
315
-
316
- /**
317
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lookupNamespaceURI)
318
- */
319
- @send
320
- external lookupNamespaceURI: (htmlParagraphElement, string) => string = "lookupNamespaceURI"
321
-
322
- /**
323
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isDefaultNamespace)
324
- */
325
- @send
326
- external isDefaultNamespace: (htmlParagraphElement, string) => bool = "isDefaultNamespace"
327
-
328
- /**
329
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/insertBefore)
330
- */
331
- @send
332
- external insertBefore: (htmlParagraphElement, 't, ~child: node) => 't = "insertBefore"
333
-
334
- /**
335
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/appendChild)
336
- */
337
- @send
338
- external appendChild: (htmlParagraphElement, 't) => 't = "appendChild"
339
-
340
- /**
341
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/replaceChild)
342
- */
343
- @send
344
- external replaceChild: (htmlParagraphElement, ~node: node, 't) => 't = "replaceChild"
345
-
346
- /**
347
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/removeChild)
348
- */
349
- @send
350
- external removeChild: (htmlParagraphElement, 't) => 't = "removeChild"
351
-
352
- /**
353
- Returns true if element has attributes, and false otherwise.
354
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/hasAttributes)
355
- */
356
- @send
357
- external hasAttributes: htmlParagraphElement => bool = "hasAttributes"
358
-
359
- /**
360
- Returns the qualified names of all element's attributes. Can contain duplicates.
361
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNames)
362
- */
363
- @send
364
- external getAttributeNames: htmlParagraphElement => array<string> = "getAttributeNames"
365
-
366
- /**
367
- Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise.
368
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAttribute)
369
- */
370
- @send
371
- external getAttribute: (htmlParagraphElement, string) => string = "getAttribute"
372
-
373
- /**
374
- Returns element's attribute whose namespace is namespace and local name is localName, and null if there is no such attribute otherwise.
375
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNS)
376
- */
377
- @send
378
- external getAttributeNS: (htmlParagraphElement, ~namespace: string, ~localName: string) => string =
379
- "getAttributeNS"
380
-
381
- /**
382
- Sets the value of element's first attribute whose qualified name is qualifiedName to value.
383
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setAttribute)
384
- */
385
- @send
386
- external setAttribute: (htmlParagraphElement, ~qualifiedName: string, ~value: string) => unit =
387
- "setAttribute"
388
-
389
- /**
390
- Sets the value of element's attribute whose namespace is namespace and local name is localName to value.
391
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNS)
392
- */
393
- @send
394
- external setAttributeNS: (
395
- htmlParagraphElement,
396
- ~namespace: string,
397
- ~qualifiedName: string,
398
- ~value: string,
399
- ) => unit = "setAttributeNS"
400
-
401
- /**
402
- Removes element's first attribute whose qualified name is qualifiedName.
403
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/removeAttribute)
404
- */
405
- @send
406
- external removeAttribute: (htmlParagraphElement, string) => unit = "removeAttribute"
407
-
408
- /**
409
- Removes element's attribute whose namespace is namespace and local name is localName.
410
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/removeAttributeNS)
411
- */
412
- @send
413
- external removeAttributeNS: (htmlParagraphElement, ~namespace: string, ~localName: string) => unit =
414
- "removeAttributeNS"
415
-
416
- /**
417
- 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.
418
-
419
- Returns true if qualifiedName is now present, and false otherwise.
420
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/toggleAttribute)
421
- */
422
- @send
423
- external toggleAttribute: (htmlParagraphElement, ~qualifiedName: string, ~force: bool=?) => bool =
424
- "toggleAttribute"
425
-
426
- /**
427
- Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise.
428
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/hasAttribute)
429
- */
430
- @send
431
- external hasAttribute: (htmlParagraphElement, string) => bool = "hasAttribute"
432
-
433
- /**
434
- Returns true if element has an attribute whose namespace is namespace and local name is localName.
435
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/hasAttributeNS)
436
- */
437
- @send
438
- external hasAttributeNS: (htmlParagraphElement, ~namespace: string, ~localName: string) => bool =
439
- "hasAttributeNS"
440
-
441
- /**
442
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNode)
443
- */
444
- @send
445
- external getAttributeNode: (htmlParagraphElement, string) => attr = "getAttributeNode"
446
-
447
- /**
448
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNodeNS)
449
- */
450
- @send
451
- external getAttributeNodeNS: (
452
- htmlParagraphElement,
453
- ~namespace: string,
454
- ~localName: string,
455
- ) => attr = "getAttributeNodeNS"
456
-
457
- /**
458
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNode)
459
- */
460
- @send
461
- external setAttributeNode: (htmlParagraphElement, attr) => attr = "setAttributeNode"
462
-
463
- /**
464
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNodeNS)
465
- */
466
- @send
467
- external setAttributeNodeNS: (htmlParagraphElement, attr) => attr = "setAttributeNodeNS"
468
-
469
- /**
470
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/removeAttributeNode)
471
- */
472
- @send
473
- external removeAttributeNode: (htmlParagraphElement, attr) => attr = "removeAttributeNode"
474
-
475
- /**
476
- Creates a shadow root for element and returns it.
477
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/attachShadow)
478
- */
479
- @send
480
- external attachShadow: (htmlParagraphElement, shadowRootInit) => shadowRoot = "attachShadow"
481
-
482
- /**
483
- Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise.
484
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/closest)
485
- */
486
- @send
487
- external closest: (htmlParagraphElement, string) => 'e = "closest"
488
-
489
- /**
490
- Returns true if matching selectors against element's root yields element, and false otherwise.
491
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/matches)
492
- */
493
- @send
494
- external matches: (htmlParagraphElement, string) => bool = "matches"
495
-
496
- /**
497
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getElementsByTagName)
498
- */
499
- @send
500
- external getElementsByTagName: (htmlParagraphElement, string) => htmlCollection =
501
- "getElementsByTagName"
502
-
503
- /**
504
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getElementsByTagNameNS)
505
- */
506
- @send
507
- external getElementsByTagNameNS: (
508
- htmlParagraphElement,
509
- ~namespace: string,
510
- ~localName: string,
511
- ) => htmlCollectionOf<element> = "getElementsByTagNameNS"
512
-
513
- /**
514
- 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.
515
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getElementsByClassName)
516
- */
517
- @send
518
- external getElementsByClassName: (htmlParagraphElement, string) => htmlCollectionOf<element> =
519
- "getElementsByClassName"
520
-
521
- /**
522
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentElement)
523
- */
524
- @send
525
- external insertAdjacentElement: (
526
- htmlParagraphElement,
527
- ~where: insertPosition,
528
- ~element: element,
529
- ) => element = "insertAdjacentElement"
530
-
531
- /**
532
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentText)
533
- */
534
- @send
535
- external insertAdjacentText: (htmlParagraphElement, ~where: insertPosition, ~data: string) => unit =
536
- "insertAdjacentText"
537
-
538
- /**
539
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/computedStyleMap)
540
- */
541
- @send
542
- external computedStyleMap: htmlParagraphElement => stylePropertyMapReadOnly = "computedStyleMap"
543
-
544
- /**
545
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getClientRects)
546
- */
547
- @send
548
- external getClientRects: htmlParagraphElement => domRectList = "getClientRects"
549
-
550
- /**
551
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getBoundingClientRect)
552
- */
553
- @send
554
- external getBoundingClientRect: htmlParagraphElement => domRect = "getBoundingClientRect"
555
-
556
- /**
557
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/checkVisibility)
558
- */
559
- @send
560
- external checkVisibility: (htmlParagraphElement, ~options: checkVisibilityOptions=?) => bool =
561
- "checkVisibility"
562
-
563
- /**
564
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollIntoView)
565
- */
566
- @send
567
- external scrollIntoView: (htmlParagraphElement, ~arg: bool=?) => unit = "scrollIntoView"
568
-
569
- /**
570
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollIntoView)
571
- */
572
- @send
573
- external scrollIntoView2: (htmlParagraphElement, ~arg: scrollIntoViewOptions=?) => unit =
574
- "scrollIntoView"
575
-
576
- /**
577
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scroll)
578
- */
579
- @send
580
- external scroll: (htmlParagraphElement, ~options: scrollToOptions=?) => unit = "scroll"
581
-
582
- /**
583
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scroll)
584
- */
585
- @send
586
- external scroll2: (htmlParagraphElement, ~x: float, ~y: float) => unit = "scroll"
587
-
588
- /**
589
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTo)
590
- */
591
- @send
592
- external scrollTo: (htmlParagraphElement, ~options: scrollToOptions=?) => unit = "scrollTo"
593
-
594
- /**
595
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTo)
596
- */
597
- @send
598
- external scrollTo2: (htmlParagraphElement, ~x: float, ~y: float) => unit = "scrollTo"
599
-
600
- /**
601
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollBy)
602
- */
603
- @send
604
- external scrollBy: (htmlParagraphElement, ~options: scrollToOptions=?) => unit = "scrollBy"
605
-
606
- /**
607
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollBy)
608
- */
609
- @send
610
- external scrollBy2: (htmlParagraphElement, ~x: float, ~y: float) => unit = "scrollBy"
611
-
612
- /**
613
- Displays element fullscreen and resolves promise when done.
614
-
615
- 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.
616
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/requestFullscreen)
617
- */
618
- @send
619
- external requestFullscreen: (
620
- htmlParagraphElement,
621
- ~options: fullscreenOptions=?,
622
- ) => Promise.t<unit> = "requestFullscreen"
623
-
624
- /**
625
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setHTMLUnsafe)
626
- */
627
- @send
628
- external setHTMLUnsafe: (htmlParagraphElement, string) => unit = "setHTMLUnsafe"
629
-
630
- /**
631
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getHTML)
632
- */
633
- @send
634
- external getHTML: (htmlParagraphElement, ~options: getHTMLOptions=?) => string = "getHTML"
635
-
636
- /**
637
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentHTML)
638
- */
639
- @send
640
- external insertAdjacentHTML: (
641
- htmlParagraphElement,
642
- ~position: insertPosition,
643
- ~string: string,
644
- ) => unit = "insertAdjacentHTML"
645
-
646
- /**
647
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setPointerCapture)
648
- */
649
- @send
650
- external setPointerCapture: (htmlParagraphElement, int) => unit = "setPointerCapture"
651
-
652
- /**
653
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/releasePointerCapture)
654
- */
655
- @send
656
- external releasePointerCapture: (htmlParagraphElement, int) => unit = "releasePointerCapture"
657
-
658
- /**
659
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/hasPointerCapture)
660
- */
661
- @send
662
- external hasPointerCapture: (htmlParagraphElement, int) => bool = "hasPointerCapture"
663
-
664
- /**
665
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/requestPointerLock)
666
- */
667
- @send
668
- external requestPointerLock: (
669
- htmlParagraphElement,
670
- ~options: pointerLockOptions=?,
671
- ) => Promise.t<unit> = "requestPointerLock"
672
-
673
- /**
674
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/click)
675
- */
676
- @send
677
- external click: htmlParagraphElement => unit = "click"
678
-
679
- /**
680
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/attachInternals)
681
- */
682
- @send
683
- external attachInternals: htmlParagraphElement => elementInternals = "attachInternals"
684
-
685
- /**
686
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/showPopover)
687
- */
688
- @send
689
- external showPopover: htmlParagraphElement => unit = "showPopover"
690
-
691
- /**
692
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/hidePopover)
693
- */
694
- @send
695
- external hidePopover: htmlParagraphElement => unit = "hidePopover"
696
-
697
- /**
698
- [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLElement/togglePopover)
699
- */
700
- @send
701
- external togglePopover: (htmlParagraphElement, ~force: bool=?) => bool = "togglePopover"
3
+ include HTMLElement.Impl({
4
+ type t = htmlParagraphElement
5
+ })