@rescript/webapi 0.1.0-alpha-b1d58f9

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 (341) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +35 -0
  3. package/package.json +61 -0
  4. package/rescript.json +557 -0
  5. package/src/animation/Animation.res +149 -0
  6. package/src/animation/AnimationEffect.res +71 -0
  7. package/src/animation/DocumentTimeline.res +8 -0
  8. package/src/canvas/Canvas.res +179 -0
  9. package/src/canvas/CanvasGradient.res +11 -0
  10. package/src/canvas/CanvasPattern.res +11 -0
  11. package/src/canvas/CanvasRenderingContext2D.res +868 -0
  12. package/src/canvas/CanvasTypes.res +452 -0
  13. package/src/canvas/FillStyle.res +25 -0
  14. package/src/canvas/HTMLCanvasElement.res +101 -0
  15. package/src/canvas/ImageBitmap.res +6 -0
  16. package/src/canvas/ImageBitmapRenderingContext.res +9 -0
  17. package/src/canvas/ImageData.res +17 -0
  18. package/src/canvas/OffscreenCanvas.res +87 -0
  19. package/src/canvas/Path2D.res +186 -0
  20. package/src/canvas/VideoColorSpace.res +11 -0
  21. package/src/canvas/VideoFrame.res +217 -0
  22. package/src/core/ArrayBufferTypedArrayOrDataView.res +4 -0
  23. package/src/core/DOM.res +1026 -0
  24. package/src/core/EventType.res +108 -0
  25. package/src/crypto/Crypto.res +11 -0
  26. package/src/crypto/SubtleCrypto.res +173 -0
  27. package/src/crypto/WebCryptoTypes.res +71 -0
  28. package/src/css-font-loading/BaseCSSFontLoading.res +24 -0
  29. package/src/css-font-loading/CssFontLoadingTypes.res +92 -0
  30. package/src/css-font-loading/FontFace.res +62 -0
  31. package/src/css-font-loading/FontFaceSet.res +38 -0
  32. package/src/cssom/CSSRuleList.res +5 -0
  33. package/src/cssom/CSSStyleDeclaration.res +1734 -0
  34. package/src/cssom/CSSStyleValue.res +17 -0
  35. package/src/cssom/MediaList.res +29 -0
  36. package/src/cssom/MediaQueryList.res +18 -0
  37. package/src/cssom/StylePropertyMap.res +56 -0
  38. package/src/cssom/StylePropertyMapReadOnly.res +22 -0
  39. package/src/cssom/StyleSheet.res +152 -0
  40. package/src/cssom/StyleSheetList.res +17 -0
  41. package/src/device/GamepadHapticActuator.res +16 -0
  42. package/src/device/GamepadTypes.res +86 -0
  43. package/src/device/Geolocation.res +31 -0
  44. package/src/device/GeolocationCoordinates.res +5 -0
  45. package/src/device/GeolocationPosition.res +5 -0
  46. package/src/device/GeolocationTypes.res +81 -0
  47. package/src/device/LockManager.res +26 -0
  48. package/src/device/ScreenOrientation.res +7 -0
  49. package/src/device/ScreenWakeLockTypes.res +26 -0
  50. package/src/device/WakeLock.res +8 -0
  51. package/src/device/WakeLockSentinel.res +7 -0
  52. package/src/device/WebLocksTypes.res +45 -0
  53. package/src/device/WebMIDI.res +7 -0
  54. package/src/device/WebMidiTypes.res +36 -0
  55. package/src/dom-nodes/AbstractRange.res +30 -0
  56. package/src/dom-nodes/Attr.res +101 -0
  57. package/src/dom-nodes/CDATASection.res +7 -0
  58. package/src/dom-nodes/CaretPosition.res +2 -0
  59. package/src/dom-nodes/CharacterData.res +199 -0
  60. package/src/dom-nodes/Comment.res +15 -0
  61. package/src/dom-nodes/DOMImplementation.res +131 -0
  62. package/src/dom-nodes/DOMTree.res +1653 -0
  63. package/src/dom-nodes/DocumentFragment.res +96 -0
  64. package/src/dom-nodes/Element.res +509 -0
  65. package/src/dom-nodes/ElementInternals.res +39 -0
  66. package/src/dom-nodes/HTML.res +11 -0
  67. package/src/dom-nodes/HTMLCollection.res +25 -0
  68. package/src/dom-nodes/NamedNodeMap.res +46 -0
  69. package/src/dom-nodes/Node.res +114 -0
  70. package/src/dom-nodes/NodeFilter.res +4 -0
  71. package/src/dom-nodes/NodeIterator.res +38 -0
  72. package/src/dom-nodes/NodeList.res +6 -0
  73. package/src/dom-nodes/ProcessingInstruction.res +15 -0
  74. package/src/dom-nodes/Range.res +156 -0
  75. package/src/dom-nodes/Selection.res +137 -0
  76. package/src/dom-nodes/ShadowRoot.res +23 -0
  77. package/src/dom-nodes/StaticRange.res +6 -0
  78. package/src/dom-nodes/Text.res +31 -0
  79. package/src/dom-nodes/TreeWalker.res +65 -0
  80. package/src/dom-platform/DOMException.res +7 -0
  81. package/src/dom-platform/DOMStringList.res +15 -0
  82. package/src/dom-platform/DOMStringMap.res +5 -0
  83. package/src/dom-platform/DOMTokenList.res +70 -0
  84. package/src/event/AbortController.res +9 -0
  85. package/src/event/AbortSignal.res +25 -0
  86. package/src/event/Event.res +76 -0
  87. package/src/event/EventTarget.res +91 -0
  88. package/src/event/ExtendableEvent.res +14 -0
  89. package/src/fetch/BodyInit.res +46 -0
  90. package/src/fetch/Fetch.res +12 -0
  91. package/src/fetch/FetchTypes.res +282 -0
  92. package/src/fetch/FormData.res +71 -0
  93. package/src/fetch/FormDataEntryValue.res +2 -0
  94. package/src/fetch/Headers.res +59 -0
  95. package/src/fetch/HeadersInit.res +16 -0
  96. package/src/fetch/Request.res +61 -0
  97. package/src/fetch/Response.res +127 -0
  98. package/src/file/BaseFileAndDirectoryEntries.res +72 -0
  99. package/src/file/Blob.res +48 -0
  100. package/src/file/File.res +15 -0
  101. package/src/file/FileAndDirectoryEntriesTypes.res +35 -0
  102. package/src/file/FileList.res +16 -0
  103. package/src/file/FileSystemDirectoryEntry.res +42 -0
  104. package/src/file/FileSystemDirectoryHandle.res +49 -0
  105. package/src/file/FileSystemDirectoryReader.res +9 -0
  106. package/src/file/FileSystemEntry.res +9 -0
  107. package/src/file/FileSystemFileHandle.res +25 -0
  108. package/src/file/FileSystemHandle.res +6 -0
  109. package/src/file/FileSystemWritableFileStream.res +65 -0
  110. package/src/file/FileTypes.res +225 -0
  111. package/src/file/ReadableStream.res +79 -0
  112. package/src/file/WritableStream.res +27 -0
  113. package/src/file/WritableStreamDefaultController.res +5 -0
  114. package/src/geometry/DOMMatrix.res +206 -0
  115. package/src/geometry/DOMMatrixReadOnly.res +140 -0
  116. package/src/geometry/DOMPoint.res +28 -0
  117. package/src/geometry/DOMPointReadOnly.res +22 -0
  118. package/src/geometry/DOMRect.res +22 -0
  119. package/src/geometry/DOMRectList.res +2 -0
  120. package/src/geometry/DOMRectReadOnly.res +19 -0
  121. package/src/html/HTMLAnchorElement.res +373 -0
  122. package/src/html/HTMLAreaElement.res +353 -0
  123. package/src/html/HTMLBRElement.res +9 -0
  124. package/src/html/HTMLBaseElement.res +20 -0
  125. package/src/html/HTMLBodyElement.res +9 -0
  126. package/src/html/HTMLButtonElement.res +98 -0
  127. package/src/html/HTMLDListElement.res +9 -0
  128. package/src/html/HTMLDataElement.res +14 -0
  129. package/src/html/HTMLDataListElement.res +14 -0
  130. package/src/html/HTMLDialogElement.res +40 -0
  131. package/src/html/HTMLDivElement.res +9 -0
  132. package/src/html/HTMLElement.res +108 -0
  133. package/src/html/HTMLEmbedElement.res +275 -0
  134. package/src/html/HTMLFieldSetElement.res +70 -0
  135. package/src/html/HTMLFormControlsCollection.res +21 -0
  136. package/src/html/HTMLFormElement.res +39 -0
  137. package/src/html/HTMLFrameSetElement.res +9 -0
  138. package/src/html/HTMLHRElement.res +9 -0
  139. package/src/html/HTMLHeadElement.res +256 -0
  140. package/src/html/HTMLHeadingElement.res +9 -0
  141. package/src/html/HTMLHtmlElement.res +9 -0
  142. package/src/html/HTMLIFrameElement.res +69 -0
  143. package/src/html/HTMLImageElement.res +349 -0
  144. package/src/html/HTMLInputElement.res +310 -0
  145. package/src/html/HTMLLIElement.res +9 -0
  146. package/src/html/HTMLLabelElement.res +25 -0
  147. package/src/html/HTMLLegendElement.res +14 -0
  148. package/src/html/HTMLLinkElement.res +69 -0
  149. package/src/html/HTMLMapElement.res +20 -0
  150. package/src/html/HTMLMenuElement.res +8 -0
  151. package/src/html/HTMLMetaElement.res +29 -0
  152. package/src/html/HTMLMeterElement.res +38 -0
  153. package/src/html/HTMLModElement.res +9 -0
  154. package/src/html/HTMLOListElement.res +24 -0
  155. package/src/html/HTMLObjectElement.res +89 -0
  156. package/src/html/HTMLOptGroupElement.res +19 -0
  157. package/src/html/HTMLOptionElement.res +49 -0
  158. package/src/html/HTMLOptionsCollection.res +35 -0
  159. package/src/html/HTMLOutputElement.res +73 -0
  160. package/src/html/HTMLParagraphElement.res +9 -0
  161. package/src/html/HTMLPictureElement.res +9 -0
  162. package/src/html/HTMLPreElement.res +9 -0
  163. package/src/html/HTMLProgressElement.res +29 -0
  164. package/src/html/HTMLQuoteElement.res +9 -0
  165. package/src/html/HTMLScriptElement.res +310 -0
  166. package/src/html/HTMLSelectElement.res +157 -0
  167. package/src/html/HTMLSlotElement.res +34 -0
  168. package/src/html/HTMLSourceElement.res +18 -0
  169. package/src/html/HTMLSpanElement.res +9 -0
  170. package/src/html/HTMLStyleElement.res +24 -0
  171. package/src/html/HTMLTableCaptionElement.res +9 -0
  172. package/src/html/HTMLTableCellElement.res +40 -0
  173. package/src/html/HTMLTableElement.res +100 -0
  174. package/src/html/HTMLTableRowElement.res +40 -0
  175. package/src/html/HTMLTableSectionElement.res +30 -0
  176. package/src/html/HTMLTemplateElement.res +31 -0
  177. package/src/html/HTMLTextAreaElement.res +177 -0
  178. package/src/html/HTMLTimeElement.res +14 -0
  179. package/src/html/HTMLTitleElement.res +15 -0
  180. package/src/html/HTMLUListElement.res +9 -0
  181. package/src/html/HTMLUnknownElement.res +9 -0
  182. package/src/media/BaseEncryptedMediaExtensions.res +97 -0
  183. package/src/media/DomHTMLMediaElement.res +206 -0
  184. package/src/media/EncryptedMediaExtensionsHTMLMediaElement.res +15 -0
  185. package/src/media/EncryptedMediaExtensionsTypes.res +43 -0
  186. package/src/media/HTMLAudioElement.res +9 -0
  187. package/src/media/HTMLTrackElement.res +14 -0
  188. package/src/media/HTMLVideoElement.res +78 -0
  189. package/src/media/MediaCapabilities.res +19 -0
  190. package/src/media/MediaCapabilitiesTypes.res +83 -0
  191. package/src/media/MediaCaptureAndStreamsTypes.res +197 -0
  192. package/src/media/MediaDeviceInfo.res +9 -0
  193. package/src/media/MediaDevices.res +40 -0
  194. package/src/media/MediaError.res +14 -0
  195. package/src/media/MediaKeySession.res +53 -0
  196. package/src/media/MediaKeyStatusMap.res +11 -0
  197. package/src/media/MediaKeySystemAccess.res +14 -0
  198. package/src/media/MediaKeys.res +35 -0
  199. package/src/media/MediaMetadata.res +10 -0
  200. package/src/media/MediaSession.res +25 -0
  201. package/src/media/MediaSessionTypes.res +85 -0
  202. package/src/media/MediaStream.res +89 -0
  203. package/src/media/MediaStreamTrack.res +51 -0
  204. package/src/media/PictureInPicture.res +7 -0
  205. package/src/media/PictureInPictureTypes.res +17 -0
  206. package/src/media/RemotePlayback.res +25 -0
  207. package/src/media/RemotePlaybackTypes.res +20 -0
  208. package/src/media/SpeechSynthesis.res +33 -0
  209. package/src/media/SpeechSynthesisUtterance.res +8 -0
  210. package/src/media/TextTrack.res +15 -0
  211. package/src/media/TextTrackCueList.res +9 -0
  212. package/src/media/TextTrackList.res +17 -0
  213. package/src/media/TimeRanges.res +29 -0
  214. package/src/media/VideoPlaybackQuality.res +18 -0
  215. package/src/media/WebSpeechTypes.res +83 -0
  216. package/src/media/WebVttTypes.res +123 -0
  217. package/src/messaging/ApplicationServerKey.res +2 -0
  218. package/src/messaging/ChannelMessagingTypes.res +12 -0
  219. package/src/messaging/CloseEvent.res +10 -0
  220. package/src/messaging/MessageEvent.res +43 -0
  221. package/src/messaging/MessagePort.res +38 -0
  222. package/src/messaging/Notification.res +46 -0
  223. package/src/messaging/NotificationTypes.res +107 -0
  224. package/src/messaging/PushEvent.res +3 -0
  225. package/src/messaging/PushManager.res +24 -0
  226. package/src/messaging/PushMessageData.res +15 -0
  227. package/src/messaging/PushSubscription.res +20 -0
  228. package/src/messaging/PushTypes.res +88 -0
  229. package/src/messaging/WebSocket.res +74 -0
  230. package/src/messaging/WebSocketsTypes.res +124 -0
  231. package/src/navigator/Clipboard.res +29 -0
  232. package/src/navigator/ClipboardItem.res +20 -0
  233. package/src/navigator/ClipboardTypes.res +31 -0
  234. package/src/navigator/CredentialManagementTypes.res +138 -0
  235. package/src/navigator/CredentialsContainer.res +33 -0
  236. package/src/navigator/Navigator.res +166 -0
  237. package/src/navigator/Permissions.res +10 -0
  238. package/src/navigator/PermissionsTypes.res +38 -0
  239. package/src/observers/IntersectionObserver.res +36 -0
  240. package/src/observers/IntersectionObserverRoot.res +23 -0
  241. package/src/observers/IntersectionObserverTypes.res +67 -0
  242. package/src/observers/MutationObserver.res +94 -0
  243. package/src/observers/ResizeObserver.res +30 -0
  244. package/src/observers/ResizeObserverTypes.res +56 -0
  245. package/src/performance/Performance.res +101 -0
  246. package/src/performance/PerformanceEntry.res +5 -0
  247. package/src/performance/PerformanceMark.res +16 -0
  248. package/src/performance/PerformanceTypes.res +86 -0
  249. package/src/storage/Cache.res +117 -0
  250. package/src/storage/CacheStorage.res +43 -0
  251. package/src/storage/CacheTypes.res +24 -0
  252. package/src/storage/IDBDatabase.res +54 -0
  253. package/src/storage/IDBFactory.res +34 -0
  254. package/src/storage/IDBIndex.res +83 -0
  255. package/src/storage/IDBObjectStore.res +183 -0
  256. package/src/storage/IDBTransaction.res +22 -0
  257. package/src/storage/IndexedDbTypes.res +213 -0
  258. package/src/storage/Storage.res +42 -0
  259. package/src/storage/StorageEvent.res +10 -0
  260. package/src/storage/StorageManager.res +24 -0
  261. package/src/storage/StorageTypes.res +11 -0
  262. package/src/storage/WebStorageTypes.res +57 -0
  263. package/src/svg/SVGElement.res +115 -0
  264. package/src/svg/SVGGraphicsElement.res +16 -0
  265. package/src/svg/SVGLength.res +9 -0
  266. package/src/ui-events/CompositionEvent.res +10 -0
  267. package/src/ui-events/DataTransfer.res +38 -0
  268. package/src/ui-events/DataTransferItem.res +21 -0
  269. package/src/ui-events/DataTransferItemList.res +34 -0
  270. package/src/ui-events/FocusEvent.res +10 -0
  271. package/src/ui-events/InputEvent.res +16 -0
  272. package/src/ui-events/KeyboardEvent.res +16 -0
  273. package/src/ui-events/MouseEvent.res +26 -0
  274. package/src/ui-events/PointerEvent.res +24 -0
  275. package/src/ui-events/Touch.res +5 -0
  276. package/src/ui-events/TouchEvent.res +10 -0
  277. package/src/ui-events/TouchList.res +5 -0
  278. package/src/ui-events/UIEvent.res +20 -0
  279. package/src/ui-events/UiEventsTypes.res +590 -0
  280. package/src/ui-events/WheelEvent.res +10 -0
  281. package/src/url/URL.res +38 -0
  282. package/src/url/URLSearchParams.res +104 -0
  283. package/src/url/UrlTypes.res +69 -0
  284. package/src/view-transitions/ViewTransition.res +5 -0
  285. package/src/view-transitions/ViewTransitionsTypes.res +22 -0
  286. package/src/web-audio/AnalyserNode.res +38 -0
  287. package/src/web-audio/AudioBuffer.res +33 -0
  288. package/src/web-audio/AudioBufferSourceNode.res +21 -0
  289. package/src/web-audio/AudioContext.res +59 -0
  290. package/src/web-audio/AudioDestinationNode.res +1 -0
  291. package/src/web-audio/AudioNode.res +76 -0
  292. package/src/web-audio/AudioParam.res +65 -0
  293. package/src/web-audio/AudioProcessingEvent.res +10 -0
  294. package/src/web-audio/AudioScheduledSourceNode.res +23 -0
  295. package/src/web-audio/AudioWorkletNode.res +11 -0
  296. package/src/web-audio/BaseAudioContext.res +141 -0
  297. package/src/web-audio/BiquadFilterNode.res +21 -0
  298. package/src/web-audio/ChannelMergerNode.res +10 -0
  299. package/src/web-audio/ChannelSplitterNode.res +10 -0
  300. package/src/web-audio/ConstantSourceNode.res +10 -0
  301. package/src/web-audio/ConvolverNode.res +10 -0
  302. package/src/web-audio/DelayNode.res +10 -0
  303. package/src/web-audio/DynamicsCompressorNode.res +10 -0
  304. package/src/web-audio/GainNode.res +10 -0
  305. package/src/web-audio/IIRFilterNode.res +21 -0
  306. package/src/web-audio/MediaElementAudioSourceNode.res +10 -0
  307. package/src/web-audio/MediaStreamAudioDestinationNode.res +10 -0
  308. package/src/web-audio/MediaStreamAudioSourceNode.res +10 -0
  309. package/src/web-audio/OfflineAudioCompletionEvent.res +10 -0
  310. package/src/web-audio/OfflineAudioContext.res +58 -0
  311. package/src/web-audio/OscillatorNode.res +17 -0
  312. package/src/web-audio/PannerNode.res +10 -0
  313. package/src/web-audio/PeriodicWave.res +8 -0
  314. package/src/web-audio/StereoPannerNode.res +10 -0
  315. package/src/web-audio/WaveShaperNode.res +10 -0
  316. package/src/web-audio/WebAudioTypes.res +1309 -0
  317. package/src/web-audio/Worklet.res +14 -0
  318. package/src/window/CustomElementRegistry.res +30 -0
  319. package/src/window/Document.res +470 -0
  320. package/src/window/DomGlobal.res +459 -0
  321. package/src/window/History.res +37 -0
  322. package/src/window/HistoryTypes.res +26 -0
  323. package/src/window/IdleDeadline.res +5 -0
  324. package/src/window/Location.res +108 -0
  325. package/src/window/VisualViewport.res +5 -0
  326. package/src/window/VisualViewportTypes.res +37 -0
  327. package/src/window/Window.res +556 -0
  328. package/src/window/XPathExpression.res +16 -0
  329. package/src/window/XPathResult.res +46 -0
  330. package/src/workers/Clients.res +39 -0
  331. package/src/workers/NavigationPreloadManager.res +26 -0
  332. package/src/workers/ServiceWorker.res +38 -0
  333. package/src/workers/ServiceWorkerContainer.res +34 -0
  334. package/src/workers/ServiceWorkerRegistration.res +32 -0
  335. package/src/workers/ServiceWorkerScope.res +12 -0
  336. package/src/workers/ServiceWorkerTypes.res +153 -0
  337. package/src/workers/SharedWorker.res +68 -0
  338. package/src/workers/SharedWorkerScope.res +29 -0
  339. package/src/workers/WebWorkersTypes.res +46 -0
  340. package/src/workers/Worker.res +48 -0
  341. package/src/workers/WorkerLocation.res +18 -0
@@ -0,0 +1,25 @@
1
+ /**
2
+ Gives access to properties specific to <label> elements. It inherits methods and properties from the base HTMLElement interface.
3
+ [See HTMLLabelElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLabelElement)
4
+ TODO: mark as private once mutating fields of private records is allowed
5
+ */
6
+ type t = {
7
+ ...DOMTree.htmlElement,
8
+ /**
9
+ Retrieves a reference to the form that the object is embedded in.
10
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLabelElement/form)
11
+ */
12
+ form: Null.t<DOMTree.htmlFormElement>,
13
+ /**
14
+ Sets or retrieves the object to which the given label object is assigned.
15
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLabelElement/htmlFor)
16
+ */
17
+ mutable htmlFor: string,
18
+ /**
19
+ Returns the form control that is associated with this element.
20
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLabelElement/control)
21
+ */
22
+ control: Null.t<DOMTree.htmlElement>,
23
+ }
24
+
25
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,14 @@
1
+ /**
2
+ The HTMLLegendElement is an interface allowing to access properties of the <legend> elements. It inherits properties and methods from the HTMLElement interface.
3
+ [See HTMLLegendElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLegendElement)
4
+ */
5
+ type t = private {
6
+ ...DOMTree.htmlElement,
7
+ /**
8
+ Retrieves a reference to the form that the object is embedded in.
9
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLegendElement/form)
10
+ */
11
+ form: Null.t<DOMTree.htmlFormElement>,
12
+ }
13
+
14
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,69 @@
1
+ /**
2
+ Reference information for external resources and the relationship of those resources to a document and vice-versa. This object inherits all of the properties and methods of the HTMLElement interface.
3
+ [See HTMLLinkElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement)
4
+ TODO: mark as private once mutating fields of private records is allowed
5
+ */
6
+ type t = {
7
+ ...DOMTree.htmlElement,
8
+ /**
9
+ Sets or retrieves a destination WebApiURL or an anchor point.
10
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/href)
11
+ */
12
+ mutable href: string,
13
+ /**
14
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/crossOrigin)
15
+ */
16
+ mutable crossOrigin: Null.t<string>,
17
+ /**
18
+ Sets or retrieves the relationship between the object and the destination of the link.
19
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/rel)
20
+ */
21
+ mutable rel: string,
22
+ /**
23
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/as)
24
+ */
25
+ @as("as")
26
+ mutable as_: string,
27
+ /**
28
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/relList)
29
+ */
30
+ relList: DOM.domTokenList,
31
+ /**
32
+ Sets or retrieves the media type.
33
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/media)
34
+ */
35
+ mutable media: string,
36
+ /**
37
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/integrity)
38
+ */
39
+ mutable integrity: string,
40
+ /**
41
+ Sets or retrieves the language code of the object.
42
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/hreflang)
43
+ */
44
+ mutable hreflang: string,
45
+ /**
46
+ Sets or retrieves the MIME type of the object.
47
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/type)
48
+ */
49
+ @as("type")
50
+ mutable type_: string,
51
+ /**
52
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/referrerPolicy)
53
+ */
54
+ mutable referrerPolicy: string,
55
+ /**
56
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/disabled)
57
+ */
58
+ mutable disabled: bool,
59
+ /**
60
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/fetchPriority)
61
+ */
62
+ mutable fetchPriority: string,
63
+ /**
64
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLLinkElement/sheet)
65
+ */
66
+ sheet: Null.t<StyleSheet.cssStyleSheet>,
67
+ }
68
+
69
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,20 @@
1
+ /**
2
+ Provides special properties and methods (beyond those of the regular object HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of map elements.
3
+ [See HTMLMapElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMapElement)
4
+ TODO: mark as private once mutating fields of private records is allowed
5
+ */
6
+ type t = {
7
+ ...DOMTree.htmlElement,
8
+ /**
9
+ Sets or retrieves the name of the object.
10
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMapElement/name)
11
+ */
12
+ mutable name: string,
13
+ /**
14
+ Retrieves a collection of the area objects defined for the given map object.
15
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMapElement/areas)
16
+ */
17
+ areas: HTMLCollection.t<DOMTree.element>,
18
+ }
19
+
20
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,8 @@
1
+ /**
2
+ [See HTMLMenuElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMenuElement)
3
+ */
4
+ type t = private {
5
+ ...DOMTree.htmlElement,
6
+ }
7
+
8
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,29 @@
1
+ /**
2
+ Contains descriptive metadata about a document. It inherits all of the properties and methods described in the HTMLElement interface.
3
+ [See HTMLMetaElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMetaElement)
4
+ TODO: mark as private once mutating fields of private records is allowed
5
+ */
6
+ type t = {
7
+ ...DOMTree.htmlElement,
8
+ /**
9
+ Sets or retrieves the value specified in the content attribute of the meta object.
10
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMetaElement/name)
11
+ */
12
+ mutable name: string,
13
+ /**
14
+ Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header.
15
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMetaElement/httpEquiv)
16
+ */
17
+ mutable httpEquiv: string,
18
+ /**
19
+ Gets or sets meta-information to associate with httpEquiv or name.
20
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMetaElement/content)
21
+ */
22
+ mutable content: string,
23
+ /**
24
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMetaElement/media)
25
+ */
26
+ mutable media: string,
27
+ }
28
+
29
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,38 @@
1
+ /**
2
+ The HTML <meter> elements expose the HTMLMeterElement interface, which provides special properties and methods (beyond the HTMLElement object interface they also have available to them by inheritance) for manipulating the layout and presentation of <meter> elements.
3
+ [See HTMLMeterElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement)
4
+ TODO: mark as private once mutating fields of private records is allowed
5
+ */
6
+ type t = {
7
+ ...DOMTree.htmlElement,
8
+ /**
9
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/value)
10
+ */
11
+ mutable value: float,
12
+ /**
13
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/min)
14
+ */
15
+ mutable min: float,
16
+ /**
17
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/max)
18
+ */
19
+ mutable max: float,
20
+ /**
21
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/low)
22
+ */
23
+ mutable low: float,
24
+ /**
25
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/high)
26
+ */
27
+ mutable high: float,
28
+ /**
29
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/optimum)
30
+ */
31
+ mutable optimum: float,
32
+ /**
33
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMeterElement/labels)
34
+ */
35
+ labels: DOM.nodeList<HTMLLabelElement.t>,
36
+ }
37
+
38
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,9 @@
1
+ /**
2
+ Provides special properties (beyond the regular methods and properties available through the HTMLElement interface they also have available to them by inheritance) for manipulating modification elements, that is <del> and <ins>.
3
+ [See HTMLModElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLModElement)
4
+ */
5
+ type t = private {
6
+ ...DOMTree.htmlElement,
7
+ }
8
+
9
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,24 @@
1
+ /**
2
+ Provides special properties (beyond those defined on the regular HTMLElement interface it also has available to it by inheritance) for manipulating ordered list elements.
3
+ [See HTMLOListElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOListElement)
4
+ TODO: mark as private once mutating fields of private records is allowed
5
+ */
6
+ type t = {
7
+ ...DOMTree.htmlElement,
8
+ /**
9
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOListElement/reversed)
10
+ */
11
+ mutable reversed: bool,
12
+ /**
13
+ The starting number.
14
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOListElement/start)
15
+ */
16
+ mutable start: int,
17
+ /**
18
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOListElement/type)
19
+ */
20
+ @as("type")
21
+ mutable type_: string,
22
+ }
23
+
24
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,89 @@
1
+ /**
2
+ Provides special properties and methods (beyond those on the HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of <object> element, representing external resources.
3
+ [See HTMLObjectElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement)
4
+ TODO: mark as private once mutating fields of private records is allowed
5
+ */
6
+ type t = {
7
+ ...DOMTree.htmlElement,
8
+ /**
9
+ Sets or retrieves the WebApiURL that references the data of the object.
10
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement/data)
11
+ */
12
+ mutable data: string,
13
+ /**
14
+ Sets or retrieves the MIME type of the object.
15
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement/type)
16
+ */
17
+ @as("type")
18
+ mutable type_: string,
19
+ /**
20
+ Sets or retrieves the name of the object.
21
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement/name)
22
+ */
23
+ mutable name: string,
24
+ /**
25
+ Retrieves a reference to the form that the object is embedded in.
26
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement/form)
27
+ */
28
+ form: Null.t<DOMTree.htmlFormElement>,
29
+ /**
30
+ Sets or retrieves the width of the object.
31
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement/width)
32
+ */
33
+ mutable width: string,
34
+ /**
35
+ Sets or retrieves the height of the object.
36
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement/height)
37
+ */
38
+ mutable height: string,
39
+ /**
40
+ Retrieves the document object of the page or frame.
41
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement/contentDocument)
42
+ */
43
+ contentDocument: Null.t<DOM.document>,
44
+ /**
45
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement/contentWindow)
46
+ */
47
+ contentWindow: Null.t<DOM.window>,
48
+ /**
49
+ Returns whether an element will successfully validate based on forms validation rules and constraints.
50
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement/willValidate)
51
+ */
52
+ willValidate: bool,
53
+ /**
54
+ Returns a ValidityState object that represents the validity states of an element.
55
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement/validity)
56
+ */
57
+ validity: DOM.validityState,
58
+ /**
59
+ Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
60
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement/validationMessage)
61
+ */
62
+ validationMessage: string,
63
+ }
64
+
65
+ include HTMLElement.Impl({type t = t})
66
+
67
+ @send
68
+ external getSVGDocument: t => Null.t<DOM.document> = "getSVGDocument"
69
+
70
+ /**
71
+ Returns whether a form will validate when it is submitted, without having to submit it.
72
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement/checkValidity)
73
+ */
74
+ @send
75
+ external checkValidity: t => bool = "checkValidity"
76
+
77
+ /**
78
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement/reportValidity)
79
+ */
80
+ @send
81
+ external reportValidity: t => bool = "reportValidity"
82
+
83
+ /**
84
+ Sets a custom error message that is displayed when a form is submitted.
85
+ @param error Sets a custom error message that is displayed when a form is submitted.
86
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLObjectElement/setCustomValidity)
87
+ */
88
+ @send
89
+ external setCustomValidity: (t, string) => unit = "setCustomValidity"
@@ -0,0 +1,19 @@
1
+ /**
2
+ Provides special properties and methods (beyond the regular HTMLElement object interface they also have available to them by inheritance) for manipulating the layout and presentation of <optgroup> elements.
3
+ [See HTMLOptGroupElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOptGroupElement)
4
+ TODO: mark as private once mutating fields of private records is allowed
5
+ */
6
+ type t = {
7
+ ...DOMTree.htmlElement,
8
+ /**
9
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOptGroupElement/disabled)
10
+ */
11
+ mutable disabled: bool,
12
+ /**
13
+ Sets or retrieves a value that you can use to implement your own label functionality for the object.
14
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOptGroupElement/label)
15
+ */
16
+ mutable label: string,
17
+ }
18
+
19
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,49 @@
1
+ /**
2
+ <option> elements and inherits all classes and methods of the HTMLElement interface.
3
+ [See HTMLOptionElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement)
4
+ TODO: mark as private once mutating fields of private records is allowed
5
+ */
6
+ type t = {
7
+ ...DOMTree.htmlElement,
8
+ /**
9
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/disabled)
10
+ */
11
+ mutable disabled: bool,
12
+ /**
13
+ Retrieves a reference to the form that the object is embedded in.
14
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/form)
15
+ */
16
+ form: Null.t<DOMTree.htmlFormElement>,
17
+ /**
18
+ Sets or retrieves a value that you can use to implement your own label functionality for the object.
19
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/label)
20
+ */
21
+ mutable label: string,
22
+ /**
23
+ Sets or retrieves the status of an option.
24
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/defaultSelected)
25
+ */
26
+ mutable defaultSelected: bool,
27
+ /**
28
+ Sets or retrieves whether the option in the list box is the default item.
29
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/selected)
30
+ */
31
+ mutable selected: bool,
32
+ /**
33
+ Sets or retrieves the value which is returned to the server when the form control is submitted.
34
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/value)
35
+ */
36
+ mutable value: string,
37
+ /**
38
+ Sets or retrieves the text string specified by the option tag.
39
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/text)
40
+ */
41
+ mutable text: string,
42
+ /**
43
+ Sets or retrieves the ordinal position of an option in a list box.
44
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOptionElement/index)
45
+ */
46
+ index: int,
47
+ }
48
+
49
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,35 @@
1
+ /**
2
+ HTMLOptionsCollection is an interface representing a collection of HTML option elements (in document order) and offers methods and properties for traversing the list as well as optionally altering its items. This type is returned solely by the "options" property of select.
3
+ [See HTMLOptionsCollection on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOptionsCollection)
4
+ TODO: mark as private once mutating fields of private records is allowed
5
+ */
6
+ type t = {
7
+ ...HTMLCollection.t<HTMLOptionElement.t>,
8
+ /**
9
+ Returns the index of the first selected item, if any, or -1 if there is no selected item.
10
+
11
+ Can be set, to change the selection.
12
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOptionsCollection/selectedIndex)
13
+ */
14
+ mutable selectedIndex: int,
15
+ }
16
+
17
+ /**
18
+ Inserts element before the DOMTree.node given by before.
19
+
20
+ The before argument can be a number, in which case element is inserted before the item with that number, or an element from the collection, in which case element is inserted before that element.
21
+
22
+ If before is omitted, null, or a number out of range, then element will be added at the end of the list.
23
+
24
+ This method will throw a "HierarchyRequestError" DOMException if element is an ancestor of the element into which it is to be inserted.
25
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOptionsCollection/add)
26
+ */
27
+ @throws(JsExn) @send
28
+ external add: (t, ~element: unknown, ~before: unknown=?) => unit = "add"
29
+
30
+ /**
31
+ Removes the item with index index from the collection.
32
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOptionsCollection/remove)
33
+ */
34
+ @send
35
+ external remove: (t, int) => unit = "remove"
@@ -0,0 +1,73 @@
1
+ /**
2
+ Provides properties and methods (beyond those inherited from HTMLElement) for manipulating the layout and presentation of <output> elements.
3
+ [See HTMLOutputElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement)
4
+ TODO: mark as private once mutating fields of private records is allowed
5
+ */
6
+ type t = {
7
+ ...DOMTree.htmlElement,
8
+ /**
9
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/htmlFor)
10
+ */
11
+ htmlFor: DOM.domTokenList,
12
+ /**
13
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/form)
14
+ */
15
+ form: Null.t<DOMTree.htmlFormElement>,
16
+ /**
17
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/name)
18
+ */
19
+ mutable name: string,
20
+ /**
21
+ Returns the string "output".
22
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/type)
23
+ */
24
+ @as("type")
25
+ type_: string,
26
+ /**
27
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/defaultValue)
28
+ */
29
+ mutable defaultValue: string,
30
+ /**
31
+ Returns the element's current value.
32
+
33
+ Can be set, to change the value.
34
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/value)
35
+ */
36
+ mutable value: string,
37
+ /**
38
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/willValidate)
39
+ */
40
+ willValidate: bool,
41
+ /**
42
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/validity)
43
+ */
44
+ validity: DOM.validityState,
45
+ /**
46
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/validationMessage)
47
+ */
48
+ validationMessage: string,
49
+ /**
50
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/labels)
51
+ */
52
+ labels: DOM.nodeList<HTMLLabelElement.t>,
53
+ }
54
+
55
+ include HTMLElement.Impl({type t = t})
56
+
57
+ /**
58
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/checkValidity)
59
+ */
60
+ @send
61
+ external checkValidity: t => bool = "checkValidity"
62
+
63
+ /**
64
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/reportValidity)
65
+ */
66
+ @send
67
+ external reportValidity: t => bool = "reportValidity"
68
+
69
+ /**
70
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLOutputElement/setCustomValidity)
71
+ */
72
+ @send
73
+ external setCustomValidity: (t, string) => unit = "setCustomValidity"
@@ -0,0 +1,9 @@
1
+ /**
2
+ Provides special properties (beyond those of the regular HTMLElement object interface it inherits) for manipulating <p> elements.
3
+ [See HTMLParagraphElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLParagraphElement)
4
+ */
5
+ type t = private {
6
+ ...DOMTree.htmlElement,
7
+ }
8
+
9
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,9 @@
1
+ /**
2
+ A <picture> HTML element. It doesn't implement specific properties or methods.
3
+ [See HTMLPictureElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLPictureElement)
4
+ */
5
+ type t = private {
6
+ ...DOMTree.htmlElement,
7
+ }
8
+
9
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,9 @@
1
+ /**
2
+ Exposes specific properties and methods (beyond those of the HTMLElement interface it also has available to it by inheritance) for manipulating a block of preformatted text (<pre>).
3
+ [See HTMLPreElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLPreElement)
4
+ */
5
+ type t = private {
6
+ ...DOMTree.htmlElement,
7
+ }
8
+
9
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,29 @@
1
+ /**
2
+ Provides special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of <progress> elements.
3
+ [See HTMLProgressElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLProgressElement)
4
+ TODO: mark as private once mutating fields of private records is allowed
5
+ */
6
+ type t = {
7
+ ...DOMTree.htmlElement,
8
+ /**
9
+ Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value.
10
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLProgressElement/value)
11
+ */
12
+ mutable value: float,
13
+ /**
14
+ Defines the maximum, or "done" value for a progress element.
15
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLProgressElement/max)
16
+ */
17
+ mutable max: float,
18
+ /**
19
+ Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar).
20
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLProgressElement/position)
21
+ */
22
+ position: float,
23
+ /**
24
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLProgressElement/labels)
25
+ */
26
+ labels: DOM.nodeList<HTMLLabelElement.t>,
27
+ }
28
+
29
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,9 @@
1
+ /**
2
+ Provides special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating quoting elements, like <blockquote> and <q>, but not the <cite> element.
3
+ [See HTMLQuoteElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLQuoteElement)
4
+ */
5
+ type t = private {
6
+ ...DOMTree.htmlElement,
7
+ }
8
+
9
+ include HTMLElement.Impl({type t = t})