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