@rescript/webapi 0.1.0-experimental-29b94b3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +14 -0
  3. package/package.json +38 -0
  4. package/rescript.json +19 -0
  5. package/src/CSSFontLoadingAPI/FontFace.res +34 -0
  6. package/src/CSSFontLoadingAPI/FontFaceSet.res +112 -0
  7. package/src/CSSFontLoadingAPI.res +101 -0
  8. package/src/CanvasAPI/ImageBitmap.res +8 -0
  9. package/src/CanvasAPI/OffscreenCanvas.res +123 -0
  10. package/src/CanvasAPI.res +55 -0
  11. package/src/ChannelMessagingAPI/MessagePort.res +120 -0
  12. package/src/ChannelMessagingAPI.res +13 -0
  13. package/src/ClipboardAPI/Clipboard.res +106 -0
  14. package/src/ClipboardAPI/ClipboardItem.res +21 -0
  15. package/src/ClipboardAPI.res +31 -0
  16. package/src/CredentialManagementAPI/CredentialsContainer.res +31 -0
  17. package/src/CredentialManagementAPI.res +140 -0
  18. package/src/DOMAPI/Animation.res +137 -0
  19. package/src/DOMAPI/AnimationEffect.res +19 -0
  20. package/src/DOMAPI/CSSRuleList.res +7 -0
  21. package/src/DOMAPI/CSSStyleDeclaration.res +36 -0
  22. package/src/DOMAPI/CSSStyleSheet.res +32 -0
  23. package/src/DOMAPI/CSSStyleValue.res +13 -0
  24. package/src/DOMAPI/CaretPosition.res +4 -0
  25. package/src/DOMAPI/CharacterData.res +272 -0
  26. package/src/DOMAPI/Comment.res +278 -0
  27. package/src/DOMAPI/CustomElementRegistry.res +31 -0
  28. package/src/DOMAPI/DOMImplementation.res +30 -0
  29. package/src/DOMAPI/DOMMatrix.res +169 -0
  30. package/src/DOMAPI/DOMMatrixReadOnly.res +103 -0
  31. package/src/DOMAPI/DOMPoint.res +29 -0
  32. package/src/DOMAPI/DOMPointReadOnly.res +24 -0
  33. package/src/DOMAPI/DOMRect.res +23 -0
  34. package/src/DOMAPI/DOMRectList.res +4 -0
  35. package/src/DOMAPI/DOMRectReadOnly.res +17 -0
  36. package/src/DOMAPI/DOMTokenList.res +72 -0
  37. package/src/DOMAPI/Document.res +634 -0
  38. package/src/DOMAPI/DocumentFragment.res +261 -0
  39. package/src/DOMAPI/DocumentTimeline.res +9 -0
  40. package/src/DOMAPI/Element.res +634 -0
  41. package/src/DOMAPI/ElementInternals.res +39 -0
  42. package/src/DOMAPI/FileList.res +8 -0
  43. package/src/DOMAPI/HTMLAnchorElement.res +693 -0
  44. package/src/DOMAPI/HTMLAreaElement.res +687 -0
  45. package/src/DOMAPI/HTMLAudioElement.res +750 -0
  46. package/src/DOMAPI/HTMLBRElement.res +686 -0
  47. package/src/DOMAPI/HTMLBaseElement.res +687 -0
  48. package/src/DOMAPI/HTMLBodyElement.res +687 -0
  49. package/src/DOMAPI/HTMLButtonElement.res +714 -0
  50. package/src/DOMAPI/HTMLCanvasElement.res +741 -0
  51. package/src/DOMAPI/HTMLCollection.res +15 -0
  52. package/src/DOMAPI/HTMLCollectionOf.res +16 -0
  53. package/src/DOMAPI/HTMLDListElement.res +690 -0
  54. package/src/DOMAPI/HTMLDataElement.res +687 -0
  55. package/src/DOMAPI/HTMLDataListElement.res +697 -0
  56. package/src/DOMAPI/HTMLDialogElement.res +715 -0
  57. package/src/DOMAPI/HTMLDivElement.res +686 -0
  58. package/src/DOMAPI/HTMLElement.res +685 -0
  59. package/src/DOMAPI/HTMLEmbedElement.res +693 -0
  60. package/src/DOMAPI/HTMLFieldSetElement.res +718 -0
  61. package/src/DOMAPI/HTMLFormControlsCollection.res +16 -0
  62. package/src/DOMAPI/HTMLFormElement.res +720 -0
  63. package/src/DOMAPI/HTMLFrameSetElement.res +697 -0
  64. package/src/DOMAPI/HTMLHRElement.res +686 -0
  65. package/src/DOMAPI/HTMLHeadElement.res +687 -0
  66. package/src/DOMAPI/HTMLHeadingElement.res +693 -0
  67. package/src/DOMAPI/HTMLHtmlElement.res +687 -0
  68. package/src/DOMAPI/HTMLIFrameElement.res +696 -0
  69. package/src/DOMAPI/HTMLImageElement.res +696 -0
  70. package/src/DOMAPI/HTMLInputElement.res +773 -0
  71. package/src/DOMAPI/HTMLLIElement.res +686 -0
  72. package/src/DOMAPI/HTMLLabelElement.res +690 -0
  73. package/src/DOMAPI/HTMLLegendElement.res +693 -0
  74. package/src/DOMAPI/HTMLLinkElement.res +687 -0
  75. package/src/DOMAPI/HTMLMapElement.res +686 -0
  76. package/src/DOMAPI/HTMLMediaElement.res +749 -0
  77. package/src/DOMAPI/HTMLMenuElement.res +687 -0
  78. package/src/DOMAPI/HTMLMetaElement.res +687 -0
  79. package/src/DOMAPI/HTMLMeterElement.res +690 -0
  80. package/src/DOMAPI/HTMLModElement.res +686 -0
  81. package/src/DOMAPI/HTMLOListElement.res +690 -0
  82. package/src/DOMAPI/HTMLObjectElement.res +717 -0
  83. package/src/DOMAPI/HTMLOptGroupElement.res +697 -0
  84. package/src/DOMAPI/HTMLOptionElement.res +693 -0
  85. package/src/DOMAPI/HTMLOptionsCollection.res +21 -0
  86. package/src/DOMAPI/HTMLOutputElement.res +711 -0
  87. package/src/DOMAPI/HTMLParagraphElement.res +701 -0
  88. package/src/DOMAPI/HTMLPictureElement.res +693 -0
  89. package/src/DOMAPI/HTMLPreElement.res +686 -0
  90. package/src/DOMAPI/HTMLProgressElement.res +697 -0
  91. package/src/DOMAPI/HTMLQuoteElement.res +690 -0
  92. package/src/DOMAPI/HTMLScriptElement.res +699 -0
  93. package/src/DOMAPI/HTMLSelectElement.res +762 -0
  94. package/src/DOMAPI/HTMLSlotElement.res +713 -0
  95. package/src/DOMAPI/HTMLSourceElement.res +693 -0
  96. package/src/DOMAPI/HTMLSpanElement.res +687 -0
  97. package/src/DOMAPI/HTMLStyleElement.res +690 -0
  98. package/src/DOMAPI/HTMLTableCaptionElement.res +714 -0
  99. package/src/DOMAPI/HTMLTableCellElement.res +701 -0
  100. package/src/DOMAPI/HTMLTableElement.res +755 -0
  101. package/src/DOMAPI/HTMLTableRowElement.res +713 -0
  102. package/src/DOMAPI/HTMLTableSectionElement.res +730 -0
  103. package/src/DOMAPI/HTMLTemplateElement.res +697 -0
  104. package/src/DOMAPI/HTMLTextAreaElement.res +758 -0
  105. package/src/DOMAPI/HTMLTimeElement.res +687 -0
  106. package/src/DOMAPI/HTMLTitleElement.res +690 -0
  107. package/src/DOMAPI/HTMLTrackElement.res +690 -0
  108. package/src/DOMAPI/HTMLUListElement.res +690 -0
  109. package/src/DOMAPI/HTMLVideoElement.res +778 -0
  110. package/src/DOMAPI/IdleDeadline.res +7 -0
  111. package/src/DOMAPI/ImageData.res +18 -0
  112. package/src/DOMAPI/Location.res +22 -0
  113. package/src/DOMAPI/MediaList.res +19 -0
  114. package/src/DOMAPI/MediaQueryList.res +82 -0
  115. package/src/DOMAPI/NamedNodeMap.res +45 -0
  116. package/src/DOMAPI/Navigator.res +114 -0
  117. package/src/DOMAPI/Node.res +179 -0
  118. package/src/DOMAPI/NodeFilter.res +4 -0
  119. package/src/DOMAPI/NodeIterator.res +13 -0
  120. package/src/DOMAPI/NodeList.res +8 -0
  121. package/src/DOMAPI/NodeListOf.res +9 -0
  122. package/src/DOMAPI/Range.res +149 -0
  123. package/src/DOMAPI/SVGGraphicsElement.res +675 -0
  124. package/src/DOMAPI/SVGLength.res +11 -0
  125. package/src/DOMAPI/ScreenOrientation.res +88 -0
  126. package/src/DOMAPI/Selection.res +103 -0
  127. package/src/DOMAPI/ShadowRoot.res +274 -0
  128. package/src/DOMAPI/StylePropertyMap.res +50 -0
  129. package/src/DOMAPI/StylePropertyMapReadOnly.res +13 -0
  130. package/src/DOMAPI/StyleSheetList.res +7 -0
  131. package/src/DOMAPI/Text.res +285 -0
  132. package/src/DOMAPI/TextTrackList.res +89 -0
  133. package/src/DOMAPI/TimeRanges.res +19 -0
  134. package/src/DOMAPI/TreeWalker.res +43 -0
  135. package/src/DOMAPI/VideoColorSpace.res +13 -0
  136. package/src/DOMAPI/VideoFrame.res +111 -0
  137. package/src/DOMAPI/Window.res +582 -0
  138. package/src/DOMAPI/XPathExpression.res +12 -0
  139. package/src/DOMAPI/XPathResult.res +13 -0
  140. package/src/DOMAPI.res +9668 -0
  141. package/src/EncryptedMediaExtensionsAPI/MediaKeySession.res +132 -0
  142. package/src/EncryptedMediaExtensionsAPI/MediaKeyStatusMap.res +13 -0
  143. package/src/EncryptedMediaExtensionsAPI/MediaKeySystemAccess.res +13 -0
  144. package/src/EncryptedMediaExtensionsAPI/MediaKeys.res +28 -0
  145. package/src/EncryptedMediaExtensionsAPI.res +100 -0
  146. package/src/EventAPI/AbortController.res +15 -0
  147. package/src/EventAPI/AbortSignal.res +106 -0
  148. package/src/EventAPI/Event.res +35 -0
  149. package/src/EventAPI/EventTarget.res +86 -0
  150. package/src/EventAPI.res +215 -0
  151. package/src/FetchAPI/FormData.res +58 -0
  152. package/src/FetchAPI/Headers.res +50 -0
  153. package/src/FetchAPI/Request.res +57 -0
  154. package/src/FetchAPI/Response.res +105 -0
  155. package/src/FetchAPI/URLSearchParams.res +68 -0
  156. package/src/FetchAPI.res +287 -0
  157. package/src/FileAPI/Blob.res +37 -0
  158. package/src/FileAPI/File.res +42 -0
  159. package/src/FileAPI/FileSystemDirectoryHandle.res +46 -0
  160. package/src/FileAPI/FileSystemFileHandle.res +23 -0
  161. package/src/FileAPI/FileSystemHandle.res +7 -0
  162. package/src/FileAPI/FileSystemWritableFileStream.res +63 -0
  163. package/src/FileAPI/ReadableStream.res +61 -0
  164. package/src/FileAPI/WritableStream.res +29 -0
  165. package/src/FileAPI/WritableStreamDefaultController.res +8 -0
  166. package/src/FileAPI.res +218 -0
  167. package/src/FileAndDirectoryEntriesAPI/FileSystemDirectoryEntry.res +42 -0
  168. package/src/FileAndDirectoryEntriesAPI/FileSystemDirectoryReader.res +12 -0
  169. package/src/FileAndDirectoryEntriesAPI/FileSystemEntry.res +11 -0
  170. package/src/FileAndDirectoryEntriesAPI.res +87 -0
  171. package/src/GamepadAPI/GamepadHapticActuator.res +17 -0
  172. package/src/GamepadAPI.res +85 -0
  173. package/src/GeolocationAPI/Geolocation.res +29 -0
  174. package/src/GeolocationAPI/GeolocationCoordinates.res +7 -0
  175. package/src/GeolocationAPI/GeolocationPosition.res +7 -0
  176. package/src/GeolocationAPI.res +78 -0
  177. package/src/Global.res +302 -0
  178. package/src/HistoryAPI/History.res +33 -0
  179. package/src/HistoryAPI.res +26 -0
  180. package/src/IndexedDBAPI/IDBDatabase.res +135 -0
  181. package/src/IndexedDBAPI/IDBFactory.res +31 -0
  182. package/src/IndexedDBAPI/IDBIndex.res +74 -0
  183. package/src/IndexedDBAPI/IDBObjectStore.res +167 -0
  184. package/src/IndexedDBAPI/IDBTransaction.res +102 -0
  185. package/src/IndexedDBAPI.res +205 -0
  186. package/src/MediaCapabilitiesAPI/MediaCapabilities.res +19 -0
  187. package/src/MediaCapabilitiesAPI.res +81 -0
  188. package/src/MediaCaptureAndStreamsAPI/MediaDeviceInfo.res +7 -0
  189. package/src/MediaCaptureAndStreamsAPI/MediaDevices.res +113 -0
  190. package/src/MediaCaptureAndStreamsAPI/MediaStream.res +142 -0
  191. package/src/MediaCaptureAndStreamsAPI/MediaStreamTrack.res +122 -0
  192. package/src/MediaCaptureAndStreamsAPI.res +194 -0
  193. package/src/MediaSessionAPI/MediaMetadata.res +7 -0
  194. package/src/MediaSessionAPI/MediaSession.res +17 -0
  195. package/src/MediaSessionAPI.res +83 -0
  196. package/src/NotificationAPI/Notification.res +102 -0
  197. package/src/NotificationAPI.res +82 -0
  198. package/src/PerformanceAPI/Performance.res +169 -0
  199. package/src/PerformanceAPI/PerformanceEntry.res +7 -0
  200. package/src/PerformanceAPI/PerformanceMark.res +15 -0
  201. package/src/PerformanceAPI.res +86 -0
  202. package/src/PermissionsAPI/Permissions.res +7 -0
  203. package/src/PermissionsAPI.res +39 -0
  204. package/src/PictureInPicture.res +18 -0
  205. package/src/PictureInPictureAPI.res +18 -0
  206. package/src/Prelude/DOMException.res +7 -0
  207. package/src/Prelude/DOMStringList.res +15 -0
  208. package/src/Prelude.res +39 -0
  209. package/src/PushManagerAPI/PushManager.res +25 -0
  210. package/src/PushManagerAPI/PushSubscription.res +19 -0
  211. package/src/PushManagerAPI.res +67 -0
  212. package/src/RemotePlaybackAPI/RemotePlayback.res +102 -0
  213. package/src/RemotePlaybackAPI.res +21 -0
  214. package/src/ResizeObserverAPI/ResizeObserver.res +27 -0
  215. package/src/ResizeObserverAPI.res +58 -0
  216. package/src/ScreenWakeLockAPI/WakeLock.res +7 -0
  217. package/src/ScreenWakeLockAPI/WakeLockSentinel.res +88 -0
  218. package/src/ScreenWakeLockAPI.res +26 -0
  219. package/src/ServiceWorkerAPI/Cache.res +100 -0
  220. package/src/ServiceWorkerAPI/CacheStorage.res +46 -0
  221. package/src/ServiceWorkerAPI/NavigationPreloadManager.res +25 -0
  222. package/src/ServiceWorkerAPI/ServiceWorker.res +101 -0
  223. package/src/ServiceWorkerAPI/ServiceWorkerContainer.res +114 -0
  224. package/src/ServiceWorkerAPI/ServiceWorkerRegistration.res +114 -0
  225. package/src/ServiceWorkerAPI.res +134 -0
  226. package/src/StorageAPI/StorageManager.res +26 -0
  227. package/src/StorageAPI.res +10 -0
  228. package/src/ViewTransitionsAPI/ViewTransition.res +7 -0
  229. package/src/ViewTransitionsAPI.res +23 -0
  230. package/src/VisualViewportAPI.res +38 -0
  231. package/src/WebAudioAPI/AnalyserNode.res +180 -0
  232. package/src/WebAudioAPI/AudioBuffer.res +35 -0
  233. package/src/WebAudioAPI/AudioBufferSourceNode.res +183 -0
  234. package/src/WebAudioAPI/AudioContext.res +266 -0
  235. package/src/WebAudioAPI/AudioListener.res +1 -0
  236. package/src/WebAudioAPI/AudioNode.res +143 -0
  237. package/src/WebAudioAPI/AudioParam.res +56 -0
  238. package/src/WebAudioAPI/AudioProcessingEvent.res +38 -0
  239. package/src/WebAudioAPI/AudioScheduledSourceNode.res +171 -0
  240. package/src/WebAudioAPI/AudioWorkletNode.res +160 -0
  241. package/src/WebAudioAPI/BaseAudioContext.res +212 -0
  242. package/src/WebAudioAPI/BiquadFilterNode.res +168 -0
  243. package/src/WebAudioAPI/ChannelMergerNode.res +157 -0
  244. package/src/WebAudioAPI/ChannelSplitterNode.res +159 -0
  245. package/src/WebAudioAPI/ConstantSourceNode.res +172 -0
  246. package/src/WebAudioAPI/ConvolverNode.res +157 -0
  247. package/src/WebAudioAPI/DelayNode.res +150 -0
  248. package/src/WebAudioAPI/DynamicsCompressorNode.res +162 -0
  249. package/src/WebAudioAPI/GainNode.res +149 -0
  250. package/src/WebAudioAPI/IIRFilterNode.res +168 -0
  251. package/src/WebAudioAPI/MediaElementAudioSourceNode.res +168 -0
  252. package/src/WebAudioAPI/MediaStreamAudioDestinationNode.res +168 -0
  253. package/src/WebAudioAPI/MediaStreamAudioSourceNode.res +168 -0
  254. package/src/WebAudioAPI/OfflineAudioCompletionEvent.res +40 -0
  255. package/src/WebAudioAPI/OfflineAudioContext.res +246 -0
  256. package/src/WebAudioAPI/OscillatorNode.res +176 -0
  257. package/src/WebAudioAPI/PannerNode.res +150 -0
  258. package/src/WebAudioAPI/PeriodicWave.res +8 -0
  259. package/src/WebAudioAPI/StereoPannerNode.res +157 -0
  260. package/src/WebAudioAPI/WaveShaperNode.res +157 -0
  261. package/src/WebAudioAPI/Worklet.res +13 -0
  262. package/src/WebAudioAPI.res +1271 -0
  263. package/src/WebCryptoAPI/Crypto.res +13 -0
  264. package/src/WebCryptoAPI/SubtleCrypto.res +173 -0
  265. package/src/WebCryptoAPI.res +71 -0
  266. package/src/WebLocksAPI/LockManager.res +29 -0
  267. package/src/WebLocksAPI.res +47 -0
  268. package/src/WebMIDIAPI.res +37 -0
  269. package/src/WebSocketsAPI/CloseEvent.res +37 -0
  270. package/src/WebSocketsAPI/MessageEvent.res +38 -0
  271. package/src/WebSocketsAPI/WebSocket.res +130 -0
  272. package/src/WebSocketsAPI.res +125 -0
  273. package/src/WebSpeechAPI/SpeechSynthesis.res +112 -0
  274. package/src/WebSpeechAPI/SpeechSynthesisUtterance.res +88 -0
  275. package/src/WebSpeechAPI.res +82 -0
  276. package/src/WebStorageAPI/Storage.res +44 -0
  277. package/src/WebStorageAPI/StorageEvent.res +37 -0
  278. package/src/WebStorageAPI.res +57 -0
  279. package/src/WebVTTAPI/TextTrack.res +96 -0
  280. package/src/WebVTTAPI/TextTrackCueList.res +10 -0
  281. package/src/WebVTTAPI.res +122 -0
@@ -0,0 +1,634 @@
1
+ open DOMAPI
2
+ open Prelude
3
+ open EventAPI
4
+
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.
9
+
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"
15
+
16
+ /**
17
+ Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes.
18
+
19
+ 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)
21
+ */
22
+ @send
23
+ external prepend2: (element, string) => unit = "prepend"
24
+
25
+ /**
26
+ Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.
27
+
28
+ 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)
30
+ */
31
+ @send
32
+ external append: (element, node) => unit = "append"
33
+
34
+ /**
35
+ Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.
36
+
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
+ @send
41
+ external append2: (element, string) => unit = "append"
42
+
43
+ /**
44
+ Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes.
45
+
46
+ 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)
48
+ */
49
+ @send
50
+ external replaceChildren: (element, node) => unit = "replaceChildren"
51
+
52
+ /**
53
+ Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes.
54
+
55
+ 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)
64
+ */
65
+ @send
66
+ external querySelector: (element, string) => element = "querySelector"
67
+
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)
71
+ */
72
+ @send
73
+ external querySelectorAll: (element, string) => nodeList = "querySelectorAll"
74
+
75
+ /**
76
+ Inserts nodes just before node, while replacing strings in nodes with equivalent Text nodes.
77
+
78
+ 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)
80
+ */
81
+ @send
82
+ external before: (element, node) => unit = "before"
83
+
84
+ /**
85
+ Inserts nodes just before node, while replacing strings in nodes with equivalent Text nodes.
86
+
87
+ 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)
89
+ */
90
+ @send
91
+ external before2: (element, string) => unit = "before"
92
+
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)
132
+ */
133
+ @send
134
+ external remove: element => unit = "remove"
135
+
136
+ /**
137
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/animate)
138
+ */
139
+ @send
140
+ external animate: (element, ~keyframes: any, ~options: float=?) => animation = "animate"
141
+
142
+ /**
143
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/animate)
144
+ */
145
+ @send
146
+ external animate2: (element, ~keyframes: any, ~options: keyframeAnimationOptions=?) => animation =
147
+ "animate"
148
+
149
+ /**
150
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAnimations)
151
+ */
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.
166
+
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)
171
+ */
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.
188
+
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)
195
+ */
196
+ @send
197
+ external addEventListener2: (
198
+ element,
199
+ ~type_: eventType,
200
+ ~callback: eventListener<'event>,
201
+ ~options: bool=?,
202
+ ) => unit = "addEventListener"
203
+
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)
207
+ */
208
+ @send
209
+ external removeEventListener: (
210
+ element,
211
+ ~type_: eventType,
212
+ ~callback: eventListener<'event>,
213
+ ~options: eventListenerOptions=?,
214
+ ) => unit = "removeEventListener"
215
+
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)
219
+ */
220
+ @send
221
+ external removeEventListener2: (
222
+ element,
223
+ ~type_: eventType,
224
+ ~callback: eventListener<'event>,
225
+ ~options: bool=?,
226
+ ) => unit = "removeEventListener"
227
+
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)
231
+ */
232
+ @send
233
+ external dispatchEvent: (element, event) => bool = "dispatchEvent"
234
+
235
+ /**
236
+ Returns node's root.
237
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/getRootNode)
238
+ */
239
+ @send
240
+ external getRootNode: (element, ~options: getRootNodeOptions=?) => node = "getRootNode"
241
+
242
+ /**
243
+ Returns whether node has children.
244
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/hasChildNodes)
245
+ */
246
+ @send
247
+ external hasChildNodes: element => bool = "hasChildNodes"
248
+
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)
252
+ */
253
+ @send
254
+ external normalize: element => unit = "normalize"
255
+
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)
259
+ */
260
+ @send
261
+ external cloneNode: (element, ~deep: bool=?) => node = "cloneNode"
262
+
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)
266
+ */
267
+ @send
268
+ external isEqualNode: (element, node) => bool = "isEqualNode"
269
+
270
+ /**
271
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isSameNode)
272
+ */
273
+ @send
274
+ external isSameNode: (element, node) => bool = "isSameNode"
275
+
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)
279
+ */
280
+ @send
281
+ external compareDocumentPosition: (element, node) => int = "compareDocumentPosition"
282
+
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)
286
+ */
287
+ @send
288
+ external contains: (element, node) => bool = "contains"
289
+
290
+ /**
291
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lookupPrefix)
292
+ */
293
+ @send
294
+ external lookupPrefix: (element, string) => string = "lookupPrefix"
295
+
296
+ /**
297
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/lookupNamespaceURI)
298
+ */
299
+ @send
300
+ external lookupNamespaceURI: (element, string) => string = "lookupNamespaceURI"
301
+
302
+ /**
303
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/isDefaultNamespace)
304
+ */
305
+ @send
306
+ external isDefaultNamespace: (element, string) => bool = "isDefaultNamespace"
307
+
308
+ /**
309
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/insertBefore)
310
+ */
311
+ @send
312
+ external insertBefore: (element, 't, ~child: node) => 't = "insertBefore"
313
+
314
+ /**
315
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/appendChild)
316
+ */
317
+ @send
318
+ external appendChild: (element, 't) => 't = "appendChild"
319
+
320
+ /**
321
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Node/replaceChild)
322
+ */
323
+ @send
324
+ external replaceChild: (element, ~node: node, 't) => 't = "replaceChild"
325
+
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"
331
+
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)
335
+ */
336
+ @send
337
+ external hasAttributes: element => bool = "hasAttributes"
338
+
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)
342
+ */
343
+ @send
344
+ external getAttributeNames: element => array<string> = "getAttributeNames"
345
+
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)
349
+ */
350
+ @send
351
+ external getAttribute: (element, string) => string = "getAttribute"
352
+
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)
356
+ */
357
+ @send
358
+ external getAttributeNS: (element, ~namespace: string, ~localName: string) => string =
359
+ "getAttributeNS"
360
+
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)
364
+ */
365
+ @send
366
+ external setAttribute: (element, ~qualifiedName: string, ~value: string) => unit = "setAttribute"
367
+
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)
371
+ */
372
+ @send
373
+ external setAttributeNS: (
374
+ element,
375
+ ~namespace: string,
376
+ ~qualifiedName: string,
377
+ ~value: string,
378
+ ) => unit = "setAttributeNS"
379
+
380
+ /**
381
+ Removes element's first attribute whose qualified name is qualifiedName.
382
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/removeAttribute)
383
+ */
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"
419
+
420
+ /**
421
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNode)
422
+ */
423
+ @send
424
+ external getAttributeNode: (element, string) => attr = "getAttributeNode"
425
+
426
+ /**
427
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getAttributeNodeNS)
428
+ */
429
+ @send
430
+ external getAttributeNodeNS: (element, ~namespace: string, ~localName: string) => attr =
431
+ "getAttributeNodeNS"
432
+
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"
438
+
439
+ /**
440
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setAttributeNodeNS)
441
+ */
442
+ @send
443
+ external setAttributeNodeNS: (element, attr) => attr = "setAttributeNodeNS"
444
+
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"
450
+
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)
454
+ */
455
+ @send
456
+ external attachShadow: (element, shadowRootInit) => shadowRoot = "attachShadow"
457
+
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"
464
+
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)
468
+ */
469
+ @send
470
+ external matches: (element, string) => bool = "matches"
471
+
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"
477
+
478
+ /**
479
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getElementsByTagNameNS)
480
+ */
481
+ @send
482
+ external getElementsByTagNameNS: (
483
+ element,
484
+ ~namespace: string,
485
+ ~localName: string,
486
+ ) => htmlCollectionOf<element> = "getElementsByTagNameNS"
487
+
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"
495
+
496
+ /**
497
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentElement)
498
+ */
499
+ @send
500
+ external insertAdjacentElement: (element, ~where: insertPosition, ~element: element) => element =
501
+ "insertAdjacentElement"
502
+
503
+ /**
504
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentText)
505
+ */
506
+ @send
507
+ external insertAdjacentText: (element, ~where: insertPosition, ~data: string) => unit =
508
+ "insertAdjacentText"
509
+
510
+ /**
511
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/computedStyleMap)
512
+ */
513
+ @send
514
+ external computedStyleMap: element => stylePropertyMapReadOnly = "computedStyleMap"
515
+
516
+ /**
517
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getClientRects)
518
+ */
519
+ @send
520
+ external getClientRects: element => domRectList = "getClientRects"
521
+
522
+ /**
523
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getBoundingClientRect)
524
+ */
525
+ @send
526
+ external getBoundingClientRect: element => domRect = "getBoundingClientRect"
527
+
528
+ /**
529
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/checkVisibility)
530
+ */
531
+ @send
532
+ external checkVisibility: (element, ~options: checkVisibilityOptions=?) => bool = "checkVisibility"
533
+
534
+ /**
535
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollIntoView)
536
+ */
537
+ @send
538
+ external scrollIntoView: (element, ~arg: bool=?) => unit = "scrollIntoView"
539
+
540
+ /**
541
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollIntoView)
542
+ */
543
+ @send
544
+ external scrollIntoView2: (element, ~arg: scrollIntoViewOptions=?) => unit = "scrollIntoView"
545
+
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
+ /**
559
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTo)
560
+ */
561
+ @send
562
+ external scrollTo: (element, ~options: scrollToOptions=?) => unit = "scrollTo"
563
+
564
+ /**
565
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollTo)
566
+ */
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"
575
+
576
+ /**
577
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/scrollBy)
578
+ */
579
+ @send
580
+ external scrollBy2: (element, ~x: float, ~y: float) => unit = "scrollBy"
581
+
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)
587
+ */
588
+ @send
589
+ external requestFullscreen: (element, ~options: fullscreenOptions=?) => Promise.t<unit> =
590
+ "requestFullscreen"
591
+
592
+ /**
593
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setHTMLUnsafe)
594
+ */
595
+ @send
596
+ external setHTMLUnsafe: (element, string) => unit = "setHTMLUnsafe"
597
+
598
+ /**
599
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/getHTML)
600
+ */
601
+ @send
602
+ external getHTML: (element, ~options: getHTMLOptions=?) => string = "getHTML"
603
+
604
+ /**
605
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/insertAdjacentHTML)
606
+ */
607
+ @send
608
+ external insertAdjacentHTML: (element, ~position: insertPosition, ~string: string) => unit =
609
+ "insertAdjacentHTML"
610
+
611
+ /**
612
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/setPointerCapture)
613
+ */
614
+ @send
615
+ external setPointerCapture: (element, int) => unit = "setPointerCapture"
616
+
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"
622
+
623
+ /**
624
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/hasPointerCapture)
625
+ */
626
+ @send
627
+ external hasPointerCapture: (element, int) => bool = "hasPointerCapture"
628
+
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"
@@ -0,0 +1,39 @@
1
+ open FileAPI
2
+ open FetchAPI
3
+ open DOMAPI
4
+
5
+ /**
6
+ Sets both the state and submission value of internals's target element to value.
7
+
8
+ If value is null, the element won't participate in form submission.
9
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ElementInternals/setFormValue)
10
+ */
11
+ @send
12
+ external setFormValue: (elementInternals, ~value: unknown, ~state: unknown=?) => unit =
13
+ "setFormValue"
14
+
15
+ /**
16
+ Marks internals's target element as suffering from the constraints indicated by the flags argument, and sets the element's validation message to message. If anchor is specified, the user agent might use it to indicate problems with the constraints of internals's target element when the form owner is validated interactively or reportValidity() is called.
17
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ElementInternals/setValidity)
18
+ */
19
+ @send
20
+ external setValidity: (
21
+ elementInternals,
22
+ ~flags: validityStateFlags=?,
23
+ ~message: string=?,
24
+ ~anchor: htmlElement=?,
25
+ ) => unit = "setValidity"
26
+
27
+ /**
28
+ Returns true if internals's target element has no validity problems; false otherwise. Fires an invalid event at the element in the latter case.
29
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ElementInternals/checkValidity)
30
+ */
31
+ @send
32
+ external checkValidity: elementInternals => bool = "checkValidity"
33
+
34
+ /**
35
+ Returns true if internals's target element has no validity problems; otherwise, returns false, fires an invalid event at the element, and (if the event isn't canceled) reports the problem to the user.
36
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/ElementInternals/reportValidity)
37
+ */
38
+ @send
39
+ external reportValidity: elementInternals => bool = "reportValidity"
@@ -0,0 +1,8 @@
1
+ open FileAPI
2
+ open DOMAPI
3
+
4
+ /**
5
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/FileList/item)
6
+ */
7
+ @send
8
+ external item: (fileList, int) => file = "item"