@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,100 @@
1
+ /**
2
+ Provides special properties and methods (beyond the regular HTMLElement object interface it also has available to it by inheritance) for manipulating the layout and presentation of tables in an HTML document.
3
+ [See HTMLTableElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableElement)
4
+ TODO: mark as private once mutating fields of private records is allowed
5
+ */
6
+ type rec t = {
7
+ ...DOMTree.htmlElement,
8
+ /**
9
+ Retrieves the caption object of a table.
10
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableElement/caption)
11
+ */
12
+ mutable caption: Null.t<HTMLTableCaptionElement.t>,
13
+ /**
14
+ Retrieves the tHead object of the table.
15
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableElement/tHead)
16
+ */
17
+ mutable tHead: Null.t<HTMLTableSectionElement.t>,
18
+ /**
19
+ Retrieves the tFoot object of the table.
20
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableElement/tFoot)
21
+ */
22
+ mutable tFoot: Null.t<HTMLTableSectionElement.t>,
23
+ /**
24
+ Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.
25
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableElement/tBodies)
26
+ */
27
+ tBodies: HTMLCollection.t<HTMLTableSectionElement.t>,
28
+ /**
29
+ Sets or retrieves the number of horizontal rows contained in the object.
30
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableElement/rows)
31
+ */
32
+ rows: HTMLCollection.t<HTMLTableRowElement.t>,
33
+ }
34
+
35
+ include HTMLElement.Impl({type t = t})
36
+
37
+ /**
38
+ Creates an empty caption element in the table.
39
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableElement/createCaption)
40
+ */
41
+ @send
42
+ external createCaption: t => HTMLTableCaptionElement.t = "createCaption"
43
+
44
+ /**
45
+ Deletes the caption element and its contents from the table.
46
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableElement/deleteCaption)
47
+ */
48
+ @send
49
+ external deleteCaption: t => unit = "deleteCaption"
50
+
51
+ /**
52
+ Returns the tHead element object if successful, or null otherwise.
53
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableElement/createTHead)
54
+ */
55
+ @send
56
+ external createTHead: t => HTMLTableSectionElement.t = "createTHead"
57
+
58
+ /**
59
+ Deletes the tHead element and its contents from the table.
60
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableElement/deleteTHead)
61
+ */
62
+ @send
63
+ external deleteTHead: t => unit = "deleteTHead"
64
+
65
+ /**
66
+ Creates an empty tFoot element in the table.
67
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableElement/createTFoot)
68
+ */
69
+ @send
70
+ external createTFoot: t => HTMLTableSectionElement.t = "createTFoot"
71
+
72
+ /**
73
+ Deletes the tFoot element and its contents from the table.
74
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableElement/deleteTFoot)
75
+ */
76
+ @send
77
+ external deleteTFoot: t => unit = "deleteTFoot"
78
+
79
+ /**
80
+ Creates an empty tBody element in the table.
81
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableElement/createTBody)
82
+ */
83
+ @send
84
+ external createTBody: t => HTMLTableSectionElement.t = "createTBody"
85
+
86
+ /**
87
+ Creates a new row (tr) in the table, and adds the row to the rows collection.
88
+ @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
89
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableElement/insertRow)
90
+ */
91
+ @throws(JsExn) @send
92
+ external insertRow: (t, ~index: int=?) => HTMLTableRowElement.t = "insertRow"
93
+
94
+ /**
95
+ Removes the specified row (tr) from the element and from the rows collection.
96
+ @param index Number that specifies the zero-based position in the rows collection of the row to remove.
97
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableElement/deleteRow)
98
+ */
99
+ @throws(JsExn) @send
100
+ external deleteRow: (t, int) => unit = "deleteRow"
@@ -0,0 +1,40 @@
1
+ /**
2
+ Provides special properties and methods (beyond the HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of rows in an HTML table.
3
+ [See HTMLTableRowElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableRowElement)
4
+ */
5
+ type t = private {
6
+ ...DOMTree.htmlElement,
7
+ /**
8
+ Retrieves the position of the object in the rows collection for the table.
9
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableRowElement/rowIndex)
10
+ */
11
+ rowIndex: int,
12
+ /**
13
+ Retrieves the position of the object in the collection.
14
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableRowElement/sectionRowIndex)
15
+ */
16
+ sectionRowIndex: int,
17
+ /**
18
+ Retrieves a collection of all cells in the table row.
19
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableRowElement/cells)
20
+ */
21
+ cells: HTMLCollection.t<HTMLTableCellElement.t>,
22
+ }
23
+
24
+ include HTMLElement.Impl({type t = t})
25
+
26
+ /**
27
+ Creates a new cell in the table row, and adds the cell to the cells collection.
28
+ @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.
29
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableRowElement/insertCell)
30
+ */
31
+ @throws(JsExn) @send
32
+ external insertCell: (t, ~index: int=?) => HTMLTableCellElement.t = "insertCell"
33
+
34
+ /**
35
+ Removes the specified cell from the table row, as well as from the cells collection.
36
+ @param index Number that specifies the zero-based position of the cell to remove from the table row. If no value is provided, the last cell in the cells collection is deleted.
37
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableRowElement/deleteCell)
38
+ */
39
+ @throws(JsExn) @send
40
+ external deleteCell: (t, int) => unit = "deleteCell"
@@ -0,0 +1,30 @@
1
+ /**
2
+ Provides special properties and methods (beyond the HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of sections, that is headers, footers and bodies, in an HTML table.
3
+ [See HTMLTableSectionElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableSectionElement)
4
+ */
5
+ type t = private {
6
+ ...DOMTree.htmlElement,
7
+ /**
8
+ Sets or retrieves the number of horizontal rows contained in the object.
9
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableSectionElement/rows)
10
+ */
11
+ rows: HTMLCollection.t<HTMLTableRowElement.t>,
12
+ }
13
+
14
+ include HTMLElement.Impl({type t = t})
15
+
16
+ /**
17
+ Creates a new row (tr) in the table, and adds the row to the rows collection.
18
+ @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
19
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableSectionElement/insertRow)
20
+ */
21
+ @throws(JsExn) @send
22
+ external insertRow: (t, ~index: int=?) => HTMLTableRowElement.t = "insertRow"
23
+
24
+ /**
25
+ Removes the specified row (tr) from the element and from the rows collection.
26
+ @param index Number that specifies the zero-based position in the rows collection of the row to remove.
27
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTableSectionElement/deleteRow)
28
+ */
29
+ @throws(JsExn) @send
30
+ external deleteRow: (t, int) => unit = "deleteRow"
@@ -0,0 +1,31 @@
1
+ /**
2
+ Enables access to the contents of an HTML <template> element.
3
+ [See HTMLTemplateElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement)
4
+ TODO: mark as private once mutating fields of private records is allowed
5
+ */
6
+ type t = {
7
+ ...DOMTree.htmlElement,
8
+ /**
9
+ Returns the template contents (a DocumentFragment).
10
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/content)
11
+ */
12
+ content: DOMTree.documentFragment,
13
+ /**
14
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/shadowRootMode)
15
+ */
16
+ mutable shadowRootMode: string,
17
+ /**
18
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/shadowRootDelegatesFocus)
19
+ */
20
+ mutable shadowRootDelegatesFocus: bool,
21
+ /**
22
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/shadowRootClonable)
23
+ */
24
+ mutable shadowRootClonable: bool,
25
+ /**
26
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/shadowRootSerializable)
27
+ */
28
+ mutable shadowRootSerializable: bool,
29
+ }
30
+
31
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,177 @@
1
+ /**
2
+ Provides special properties and methods for manipulating the layout and presentation of <textarea> elements.
3
+ [See HTMLTextAreaElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement)
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/HTMLTextAreaElement/autocomplete)
10
+ */
11
+ mutable autocomplete: string,
12
+ /**
13
+ Sets or retrieves the width of the object.
14
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/cols)
15
+ */
16
+ mutable cols: int,
17
+ /**
18
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/disabled)
19
+ */
20
+ mutable disabled: bool,
21
+ /**
22
+ Retrieves a reference to the form that the object is embedded in.
23
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/form)
24
+ */
25
+ form: Null.t<DOMTree.htmlFormElement>,
26
+ /**
27
+ Sets or retrieves the maximum number of characters that the user can enter in a text control.
28
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/maxLength)
29
+ */
30
+ mutable maxLength: int,
31
+ /**
32
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/minLength)
33
+ */
34
+ mutable minLength: int,
35
+ /**
36
+ Sets or retrieves the name of the object.
37
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/name)
38
+ */
39
+ mutable name: string,
40
+ /**
41
+ Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
42
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/placeholder)
43
+ */
44
+ mutable placeholder: string,
45
+ /**
46
+ Sets or retrieves the value indicated whether the content of the object is read-only.
47
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/readOnly)
48
+ */
49
+ mutable readOnly: bool,
50
+ /**
51
+ When present, marks an element that can't be submitted without a value.
52
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/required)
53
+ */
54
+ mutable required: bool,
55
+ /**
56
+ Sets or retrieves the number of horizontal rows contained in the object.
57
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/rows)
58
+ */
59
+ mutable rows: int,
60
+ /**
61
+ Sets or retrieves how to handle wordwrapping in the object.
62
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/wrap)
63
+ */
64
+ mutable wrap: string,
65
+ /**
66
+ Retrieves the type of control.
67
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/type)
68
+ */
69
+ @as("type")
70
+ type_: string,
71
+ /**
72
+ Sets or retrieves the initial contents of the object.
73
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/defaultValue)
74
+ */
75
+ mutable defaultValue: string,
76
+ /**
77
+ Retrieves or sets the text in the entry field of the textArea element.
78
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/value)
79
+ */
80
+ mutable value: string,
81
+ /**
82
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/textLength)
83
+ */
84
+ textLength: int,
85
+ /**
86
+ Returns whether an element will successfully validate based on forms validation rules and constraints.
87
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/willValidate)
88
+ */
89
+ willValidate: bool,
90
+ /**
91
+ Returns a ValidityState object that represents the validity states of an element.
92
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/validity)
93
+ */
94
+ validity: DOM.validityState,
95
+ /**
96
+ 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.
97
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/validationMessage)
98
+ */
99
+ validationMessage: string,
100
+ /**
101
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/labels)
102
+ */
103
+ labels: DOM.nodeList<HTMLLabelElement.t>,
104
+ /**
105
+ Gets or sets the starting position or offset of a text selection.
106
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/selectionStart)
107
+ */
108
+ mutable selectionStart: int,
109
+ /**
110
+ Gets or sets the end position or offset of a text selection.
111
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/selectionEnd)
112
+ */
113
+ mutable selectionEnd: int,
114
+ /**
115
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/selectionDirection)
116
+ */
117
+ mutable selectionDirection: string,
118
+ }
119
+
120
+ include HTMLElement.Impl({type t = t})
121
+
122
+ /**
123
+ Returns whether a form will validate when it is submitted, without having to submit it.
124
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/checkValidity)
125
+ */
126
+ @send
127
+ external checkValidity: t => bool = "checkValidity"
128
+
129
+ /**
130
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/reportValidity)
131
+ */
132
+ @send
133
+ external reportValidity: t => bool = "reportValidity"
134
+
135
+ /**
136
+ Sets a custom error message that is displayed when a form is submitted.
137
+ @param error Sets a custom error message that is displayed when a form is submitted.
138
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/setCustomValidity)
139
+ */
140
+ @send
141
+ external setCustomValidity: (t, string) => unit = "setCustomValidity"
142
+
143
+ /**
144
+ Highlights the input area of a form element.
145
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/select)
146
+ */
147
+ @send
148
+ external select: t => unit = "select"
149
+
150
+ /**
151
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/setRangeText)
152
+ */
153
+ @send
154
+ external setRangeText: (t, string) => unit = "setRangeText"
155
+
156
+ /**
157
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/setRangeText)
158
+ */
159
+ @send
160
+ external setRangeText2: (
161
+ t,
162
+ ~replacement: string,
163
+ ~start: int,
164
+ ~end: int,
165
+ ~selectionMode: DOM.selectionMode=?,
166
+ ) => unit = "setRangeText"
167
+
168
+ /**
169
+ Sets the start and end positions of a selection in a text field.
170
+ @param start The offset into the text field for the start of the selection.
171
+ @param end The offset into the text field for the end of the selection.
172
+ @param direction The direction in which the selection is performed.
173
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/setSelectionRange)
174
+ */
175
+ @send
176
+ external setSelectionRange: (t, ~start: int, ~end: int, ~direction: string=?) => unit =
177
+ "setSelectionRange"
@@ -0,0 +1,14 @@
1
+ /**
2
+ Provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <time> elements.
3
+ [See HTMLTimeElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTimeElement)
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/HTMLTimeElement/dateTime)
10
+ */
11
+ mutable dateTime: string,
12
+ }
13
+
14
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,15 @@
1
+ /**
2
+ Contains the title for a document. This element inherits all of the properties and methods of the HTMLElement interface.
3
+ [See HTMLTitleElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTitleElement)
4
+ TODO: mark as private once mutating fields of private records is allowed
5
+ */
6
+ type t = {
7
+ ...DOMTree.htmlElement,
8
+ /**
9
+ Retrieves or sets the text of the object as a string.
10
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTitleElement/text)
11
+ */
12
+ mutable text: string,
13
+ }
14
+
15
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,9 @@
1
+ /**
2
+ Provides special properties (beyond those defined on the regular HTMLElement interface it also has available to it by inheritance) for manipulating unordered list elements.
3
+ [See HTMLUListElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLUListElement)
4
+ */
5
+ type t = private {
6
+ ...DOMTree.htmlElement,
7
+ }
8
+
9
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,9 @@
1
+ /**
2
+ An invalid HTML element and derives from the HTMLElement interface, but without implementing any additional properties or methods.
3
+ [See HTMLUnknownElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLUnknownElement)
4
+ */
5
+ type t = {
6
+ ...DOMTree.htmlElement,
7
+ }
8
+
9
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,97 @@
1
+ type mediaKeysRequirement =
2
+ | @as("not-allowed") NotAllowed
3
+ | @as("optional") Optional
4
+ | @as("required") Required
5
+
6
+ type mediaKeySessionType =
7
+ | @as("persistent-license") PersistentLicense
8
+ | @as("temporary") Temporary
9
+
10
+ type mediaKeySessionClosedReason =
11
+ | @as("closed-by-application") ClosedByApplication
12
+ | @as("hardware-context-reset") HardwareContextReset
13
+ | @as("internal-error") InternalError
14
+ | @as("release-acknowledged") ReleaseAcknowledged
15
+ | @as("resource-evicted") ResourceEvicted
16
+
17
+ type mediaKeyStatus =
18
+ | @as("expired") Expired
19
+ | @as("internal-error") InternalError
20
+ | @as("output-downscaled") OutputDownscaled
21
+ | @as("output-restricted") OutputRestricted
22
+ | @as("released") Released
23
+ | @as("status-pending") StatusPending
24
+ | @as("usable") Usable
25
+ | @as("usable-in-future") UsableInFuture
26
+
27
+ /**
28
+ This WebApiEncryptedMediaExtensions API interface provides access to a Key System for decryption and/or a content protection provider. You can request an instance of this object using the Navigator.requestMediaKeySystemAccess method.
29
+ [See MediaKeySystemAccess on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySystemAccess)
30
+ */
31
+ @editor.completeFrom(MediaKeySystemAccess)
32
+ type mediaKeySystemAccess = private {
33
+ /**
34
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySystemAccess/keySystem)
35
+ */
36
+ keySystem: string,
37
+ }
38
+
39
+ /**
40
+ This WebApiEncryptedMediaExtensions API interface the represents a set of keys that an associated HTMLMediaElement can use for decryption of media data during playback.
41
+ [See MediaKeys on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeys)
42
+ */
43
+ @editor.completeFrom(BaseEncryptedMediaExtensions.MediaKeys)
44
+ type mediaKeys = private {}
45
+
46
+ /**
47
+ This WebApiEncryptedMediaExtensions API interface is a read-only map of media key statuses by key IDs.
48
+ [See MediaKeyStatusMap on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeyStatusMap)
49
+ */
50
+ @editor.completeFrom(BaseEncryptedMediaExtensions.MediaKeyStatusMap)
51
+ type mediaKeyStatusMap = private {
52
+ /**
53
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeyStatusMap/size)
54
+ */
55
+ size: int,
56
+ }
57
+
58
+ /**
59
+ This WebApiEncryptedMediaExtensions API interface represents a context for message exchange with a content decryption module (CDM).
60
+ [See MediaKeySession on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession)
61
+ */
62
+ @editor.completeFrom(BaseEncryptedMediaExtensions.MediaKeySession)
63
+ type mediaKeySession = private {
64
+ ...DOM.eventTarget,
65
+ /**
66
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession/sessionId)
67
+ */
68
+ sessionId: string,
69
+ /**
70
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession/expiration)
71
+ */
72
+ expiration: float,
73
+ /**
74
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession/closed)
75
+ */
76
+ closed: promise<mediaKeySessionClosedReason>,
77
+ /**
78
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession/keyStatuses)
79
+ */
80
+ keyStatuses: mediaKeyStatusMap,
81
+ }
82
+
83
+ type mediaKeySystemMediaCapability = {
84
+ mutable contentType?: string,
85
+ mutable encryptionScheme?: Nullable.t<string>,
86
+ mutable robustness?: string,
87
+ }
88
+
89
+ type mediaKeySystemConfiguration = {
90
+ mutable label?: string,
91
+ mutable initDataTypes?: array<string>,
92
+ mutable audioCapabilities?: array<mediaKeySystemMediaCapability>,
93
+ mutable videoCapabilities?: array<mediaKeySystemMediaCapability>,
94
+ mutable distinctiveIdentifier?: mediaKeysRequirement,
95
+ mutable persistentState?: mediaKeysRequirement,
96
+ mutable sessionTypes?: array<string>,
97
+ }