@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,556 @@
1
+ type t = DOM.window
2
+ type windowPostMessageOptions = DOM.windowPostMessageOptions
3
+
4
+ include EventTarget.Impl({type t = t})
5
+
6
+ external current: t = "window"
7
+
8
+ /**
9
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/window)
10
+ */
11
+ @get
12
+ external window: t => t = "window"
13
+
14
+ /**
15
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/self)
16
+ */
17
+ @get
18
+ external self: t => t = "self"
19
+
20
+ /**
21
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/document)
22
+ */
23
+ @get
24
+ external document: t => DOM.document = "document"
25
+
26
+ /**
27
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/name)
28
+ */
29
+ @get
30
+ external name: t => string = "name"
31
+
32
+ /**
33
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/location)
34
+ */
35
+ @get
36
+ external location: t => Location.t = "location"
37
+
38
+ /**
39
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/history)
40
+ */
41
+ @get
42
+ external history: t => HistoryTypes.history = "history"
43
+
44
+ /**
45
+ Defines a new custom element, mapping the given name to the given constructor as an autonomous custom element.
46
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/customElements)
47
+ */
48
+ @get
49
+ external customElements: t => DOM.customElementRegistry = "customElements"
50
+
51
+ /**
52
+ Returns true if the location bar is visible; otherwise, returns false.
53
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/locationbar)
54
+ */
55
+ @get
56
+ external locationbar: t => DOM.barProp = "locationbar"
57
+
58
+ /**
59
+ Returns true if the menu bar is visible; otherwise, returns false.
60
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/menubar)
61
+ */
62
+ @get
63
+ external menubar: t => DOM.barProp = "menubar"
64
+
65
+ /**
66
+ Returns true if the personal bar is visible; otherwise, returns false.
67
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/personalbar)
68
+ */
69
+ @get
70
+ external personalbar: t => DOM.barProp = "personalbar"
71
+
72
+ /**
73
+ Returns true if the scrollbars are visible; otherwise, returns false.
74
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/scrollbars)
75
+ */
76
+ @get
77
+ external scrollbars: t => DOM.barProp = "scrollbars"
78
+
79
+ /**
80
+ Returns true if the status bar is visible; otherwise, returns false.
81
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/statusbar)
82
+ */
83
+ @get
84
+ external statusbar: t => DOM.barProp = "statusbar"
85
+
86
+ /**
87
+ Returns true if the toolbar is visible; otherwise, returns false.
88
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/toolbar)
89
+ */
90
+ @get
91
+ external toolbar: t => DOM.barProp = "toolbar"
92
+
93
+ /**
94
+ Returns true if the window has been closed, false otherwise.
95
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/closed)
96
+ */
97
+ @get
98
+ external closed: t => bool = "closed"
99
+
100
+ /**
101
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/frames)
102
+ */
103
+ @get
104
+ external frames: t => t = "frames"
105
+
106
+ /**
107
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/length)
108
+ */
109
+ @get
110
+ external length: t => int = "length"
111
+
112
+ /**
113
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/top)
114
+ */
115
+ @get
116
+ external top: t => Null.t<t> = "top"
117
+
118
+ /**
119
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/opener)
120
+ */
121
+ @get
122
+ external opener: t => JSON.t = "opener"
123
+
124
+ /**
125
+ Refers to either the parent WindowProxy, or itself.
126
+
127
+ It can rarely be null e.g. for contentWindow of an iframe that is already removed from the parent.
128
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/parent)
129
+ */
130
+ @get
131
+ external parent: t => Null.t<t> = "parent"
132
+
133
+ /**
134
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/frameElement)
135
+ */
136
+ @get
137
+ external frameElement: t => Null.t<DOMTree.element> = "frameElement"
138
+
139
+ /**
140
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/navigator)
141
+ */
142
+ @get
143
+ external navigator: t => DOM.navigator = "navigator"
144
+
145
+ /**
146
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/screen)
147
+ */
148
+ @get
149
+ external screen: t => DOM.screen = "screen"
150
+
151
+ /**
152
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/visualViewport)
153
+ */
154
+ @get
155
+ external visualViewport: t => Null.t<VisualViewport.t> = "visualViewport"
156
+
157
+ /**
158
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/innerWidth)
159
+ */
160
+ @get
161
+ external innerWidth: t => int = "innerWidth"
162
+
163
+ /**
164
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/innerHeight)
165
+ */
166
+ @get
167
+ external innerHeight: t => int = "innerHeight"
168
+
169
+ /**
170
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/scrollX)
171
+ */
172
+ @get
173
+ external scrollX: t => float = "scrollX"
174
+
175
+ /**
176
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/scrollY)
177
+ */
178
+ @get
179
+ external scrollY: t => float = "scrollY"
180
+
181
+ /**
182
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/screenX)
183
+ */
184
+ @get
185
+ external screenX: t => int = "screenX"
186
+
187
+ /**
188
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/screenLeft)
189
+ */
190
+ @get
191
+ external screenLeft: t => int = "screenLeft"
192
+
193
+ /**
194
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/screenY)
195
+ */
196
+ @get
197
+ external screenY: t => int = "screenY"
198
+
199
+ /**
200
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/screenTop)
201
+ */
202
+ @get
203
+ external screenTop: t => int = "screenTop"
204
+
205
+ /**
206
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/outerWidth)
207
+ */
208
+ @get
209
+ external outerWidth: t => int = "outerWidth"
210
+
211
+ /**
212
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/outerHeight)
213
+ */
214
+ @get
215
+ external outerHeight: t => int = "outerHeight"
216
+
217
+ /**
218
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/devicePixelRatio)
219
+ */
220
+ @get
221
+ external devicePixelRatio: t => float = "devicePixelRatio"
222
+
223
+ /**
224
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/speechSynthesis)
225
+ */
226
+ @get
227
+ external speechSynthesis: t => WebSpeechTypes.speechSynthesis = "speechSynthesis"
228
+
229
+ /**
230
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/origin)
231
+ */
232
+ @get
233
+ external origin: t => string = "origin"
234
+
235
+ /**
236
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/isSecureContext)
237
+ */
238
+ @get
239
+ external isSecureContext: t => bool = "isSecureContext"
240
+
241
+ /**
242
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/crossOriginIsolated)
243
+ */
244
+ @get
245
+ external crossOriginIsolated: t => bool = "crossOriginIsolated"
246
+
247
+ /**
248
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/indexedDB)
249
+ */
250
+ @get
251
+ external indexedDB: t => IndexedDbTypes.idbFactory = "indexedDB"
252
+
253
+ /**
254
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/crypto)
255
+ */
256
+ @get
257
+ external crypto: t => WebCryptoTypes.crypto = "crypto"
258
+
259
+ /**
260
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/performance)
261
+ */
262
+ @get
263
+ external performance: t => PerformanceTypes.performance = "performance"
264
+
265
+ /**
266
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/caches)
267
+ */
268
+ @get
269
+ external caches: t => CacheTypes.cacheStorage = "caches"
270
+
271
+ /**
272
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/sessionStorage)
273
+ */
274
+ @throws(JsExn) @get
275
+ external sessionStorage: t => WebStorageTypes.storage = "sessionStorage"
276
+
277
+ /**
278
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/localStorage)
279
+ */
280
+ @throws(JsExn) @get
281
+ external localStorage: t => WebStorageTypes.storage = "localStorage"
282
+
283
+ /**
284
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/reportError)
285
+ */
286
+ @send
287
+ external reportError: (t, JSON.t) => unit = "reportError"
288
+
289
+ /**
290
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/btoa)
291
+ */
292
+ @throws(JsExn) @send
293
+ external btoa: (t, string) => string = "btoa"
294
+
295
+ /**
296
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/atob)
297
+ */
298
+ @throws(JsExn) @send
299
+ external atob: (t, string) => string = "atob"
300
+
301
+ /**
302
+ Executes a function after a delay given in milliseconds expires.
303
+
304
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setTimeout)
305
+ */
306
+ @send
307
+ external setTimeout: (t, ~handler: unit => unit, ~timeout: int=?) => DOM.timeoutId = "setTimeout"
308
+
309
+ /**
310
+ Cancels the execution of a timeout created with setTimeout.
311
+
312
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/clearTimeout)
313
+ */
314
+ @send
315
+ external clearTimeout: (t, DOM.timeoutId) => unit = "clearTimeout"
316
+
317
+ /**
318
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setInterval)
319
+ */
320
+ @throws(JsExn) @send
321
+ external setInterval: (t, ~handler: string, ~timeout: int=?) => int = "setInterval"
322
+
323
+ /**
324
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setInterval)
325
+ */
326
+ @send
327
+ external setInterval2: (t, ~handler: unit => unit, ~timeout: int=?) => int = "setInterval"
328
+
329
+ /**
330
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setInterval)
331
+ */
332
+ @send
333
+ external setIntervalWithCallback: (t, ~handler: unit => unit, ~timeout: int=?) => int =
334
+ "setInterval"
335
+
336
+ /**
337
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/clearInterval)
338
+ */
339
+ @send
340
+ external clearInterval: (t, int) => unit = "clearInterval"
341
+
342
+ /**
343
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask)
344
+ */
345
+ @send
346
+ external queueMicrotask: (t, unit => unit) => unit = "queueMicrotask"
347
+
348
+ /**
349
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/structuredClone)
350
+ */
351
+ @throws(JsExn) @send
352
+ external structuredClone: (
353
+ t,
354
+ 't,
355
+ ~options: ChannelMessagingTypes.structuredSerializeOptions=?,
356
+ ) => 't = "structuredClone"
357
+
358
+ /**
359
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/requestAnimationFrame)
360
+ */
361
+ @send
362
+ external requestAnimationFrame: (t, float => unit) => int = "requestAnimationFrame"
363
+
364
+ /**
365
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/cancelAnimationFrame)
366
+ */
367
+ @send
368
+ external cancelAnimationFrame: (t, int) => unit = "cancelAnimationFrame"
369
+
370
+ /**
371
+ Closes the window.
372
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/close)
373
+ */
374
+ @send
375
+ external close: t => unit = "close"
376
+
377
+ /**
378
+ Cancels the document load.
379
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/stop)
380
+ */
381
+ @send
382
+ external stop: t => unit = "stop"
383
+
384
+ /**
385
+ Moves the focus to the window's browsing context, if any.
386
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/focus)
387
+ */
388
+ @send
389
+ external focus: t => unit = "focus"
390
+
391
+ /**
392
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/open)
393
+ */
394
+ @send
395
+ external open_: (t, ~url: string=?, ~target: string=?, ~features: string=?) => Null.t<t> = "open"
396
+
397
+ /**
398
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/alert)
399
+ */
400
+ @send
401
+ external alert: (t, ~message: string=?) => unit = "alert"
402
+
403
+ /**
404
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/confirm)
405
+ */
406
+ @send
407
+ external confirm: (t, ~message: string=?) => bool = "confirm"
408
+
409
+ /**
410
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/prompt)
411
+ */
412
+ @send
413
+ external prompt: (t, ~message: string=?, ~default: string=?) => Null.t<string> = "prompt"
414
+
415
+ /**
416
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/print)
417
+ */
418
+ @send
419
+ external print: t => unit = "print"
420
+
421
+ /**
422
+ Posts a message to the given window. Messages can be structured objects, e.g. nested objects and arrays, can contain JavaScript values (strings, numbers, Date objects, etc), and can contain certain data objects such as WebApiFile Blob, FileList, and ArrayBuffer objects.
423
+
424
+ Objects listed in the transfer member of options are transferred, not just cloned, meaning that they are no longer usable on the sending side.
425
+
426
+ A target origin can be specified using the targetOrigin member of options. If not provided, it defaults to "/". This default restricts the message to same-origin targets only.
427
+
428
+ If the origin of the target window doesn't match the given target origin, the message is discarded, to avoid information leakage. To send the message to the target regardless of origin, set the target origin to "*".
429
+
430
+ Throws a "DataCloneError" DOMException if transfer array contains duplicate objects or if message could not be cloned.
431
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/postMessage)
432
+ */
433
+ @throws(JsExn) @send
434
+ external postMessage: (
435
+ t,
436
+ ~message: JSON.t,
437
+ ~targetOrigin: string,
438
+ ~transfer: array<Dict.t<string>>=?,
439
+ ) => unit = "postMessage"
440
+
441
+ /**
442
+ Posts a message to the given window. Messages can be structured objects, e.g. nested objects and arrays, can contain JavaScript values (strings, numbers, Date objects, etc), and can contain certain data objects such as WebApiFile Blob, FileList, and ArrayBuffer objects.
443
+
444
+ Objects listed in the transfer member of options are transferred, not just cloned, meaning that they are no longer usable on the sending side.
445
+
446
+ A target origin can be specified using the targetOrigin member of options. If not provided, it defaults to "/". This default restricts the message to same-origin targets only.
447
+
448
+ If the origin of the target window doesn't match the given target origin, the message is discarded, to avoid information leakage. To send the message to the target regardless of origin, set the target origin to "*".
449
+
450
+ Throws a "DataCloneError" DOMException if transfer array contains duplicate objects or if message could not be cloned.
451
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/postMessage)
452
+ */
453
+ @throws(JsExn) @send
454
+ external postMessageWithOptions: (
455
+ t,
456
+ ~message: JSON.t,
457
+ ~options: windowPostMessageOptions=?,
458
+ ) => unit = "postMessage"
459
+
460
+ /**
461
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/matchMedia)
462
+ */
463
+ @send
464
+ external matchMedia: (t, string) => MediaQueryList.t = "matchMedia"
465
+
466
+ /**
467
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/moveTo)
468
+ */
469
+ @send
470
+ external moveTo: (t, ~x: int, ~y: int) => unit = "moveTo"
471
+
472
+ /**
473
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/moveBy)
474
+ */
475
+ @send
476
+ external moveBy: (t, ~x: int, ~y: int) => unit = "moveBy"
477
+
478
+ /**
479
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/resizeTo)
480
+ */
481
+ @send
482
+ external resizeTo: (t, ~width: int, ~height: int) => unit = "resizeTo"
483
+
484
+ /**
485
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/resizeBy)
486
+ */
487
+ @send
488
+ external resizeBy: (t, ~x: int, ~y: int) => unit = "resizeBy"
489
+
490
+ /**
491
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/scroll)
492
+ */
493
+ @send
494
+ external scroll: (t, ~options: DOM.scrollToOptions=?) => unit = "scroll"
495
+
496
+ /**
497
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/scroll)
498
+ */
499
+ @send
500
+ external scrollXY: (t, ~x: float, ~y: float) => unit = "scroll"
501
+
502
+ /**
503
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/scrollTo)
504
+ */
505
+ @send
506
+ external scrollTo: (t, ~options: DOM.scrollToOptions=?) => unit = "scrollTo"
507
+
508
+ /**
509
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/scrollTo)
510
+ */
511
+ @send
512
+ external scrollToXY: (t, ~x: float, ~y: float) => unit = "scrollTo"
513
+
514
+ /**
515
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/scrollBy)
516
+ */
517
+ @send
518
+ external scrollBy: (t, ~options: DOM.scrollToOptions=?) => unit = "scrollBy"
519
+
520
+ /**
521
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/scrollBy)
522
+ */
523
+ @send
524
+ external scrollByXY: (t, ~x: float, ~y: float) => unit = "scrollBy"
525
+
526
+ /**
527
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/getComputedStyle)
528
+ */
529
+ @throws(JsExn) @send
530
+ external getComputedStyle: (
531
+ t,
532
+ ~elt: DOMTree.element,
533
+ ~pseudoElt: string=?,
534
+ ) => CSSStyleDeclaration.t = "getComputedStyle"
535
+
536
+ /**
537
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/requestIdleCallback)
538
+ */
539
+ @send
540
+ external requestIdleCallback: (
541
+ t,
542
+ ~callback: DOM.idleDeadline => unit,
543
+ ~options: DOM.idleRequestOptions=?,
544
+ ) => int = "requestIdleCallback"
545
+
546
+ /**
547
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/cancelIdleCallback)
548
+ */
549
+ @send
550
+ external cancelIdleCallback: (t, int) => unit = "cancelIdleCallback"
551
+
552
+ /**
553
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/getSelection)
554
+ */
555
+ @send
556
+ external getSelection: t => Null.t<Selection.t> = "getSelection"
@@ -0,0 +1,16 @@
1
+ /**
2
+ This interface is a compiled XPath expression that can be evaluated on a document or specific node to return information its WebApiDOM tree.
3
+ [See XPathExpression on MDN](https://developer.mozilla.org/docs/Web/API/XPathExpression)
4
+ */
5
+ type t = private {}
6
+
7
+ /**
8
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/XPathExpression/evaluate)
9
+ */
10
+ @send
11
+ external evaluate: (
12
+ t,
13
+ ~contextNode: DOMTree.node,
14
+ ~type_: int=?,
15
+ ~result: XPathResult.t=?,
16
+ ) => XPathResult.t = "evaluate"
@@ -0,0 +1,46 @@
1
+ /**
2
+ The results generated by evaluating an XPath expression within the context of a given node.
3
+ [See XPathResult on MDN](https://developer.mozilla.org/docs/Web/API/XPathResult)
4
+ */
5
+ type t = private {
6
+ /**
7
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/XPathResult/resultType)
8
+ */
9
+ resultType: int,
10
+ /**
11
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/XPathResult/numberValue)
12
+ */
13
+ numberValue: float,
14
+ /**
15
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/XPathResult/stringValue)
16
+ */
17
+ stringValue: string,
18
+ /**
19
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/XPathResult/booleanValue)
20
+ */
21
+ booleanValue: bool,
22
+ /**
23
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/XPathResult/singleNodeValue)
24
+ */
25
+ singleNodeValue: Null.t<DOMTree.node>,
26
+ /**
27
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/XPathResult/invalidIteratorState)
28
+ */
29
+ invalidIteratorState: bool,
30
+ /**
31
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/XPathResult/snapshotLength)
32
+ */
33
+ snapshotLength: int,
34
+ }
35
+
36
+ /**
37
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/XPathResult/iterateNext)
38
+ */
39
+ @send
40
+ external iterateNext: t => Null.t<DOMTree.node> = "iterateNext"
41
+
42
+ /**
43
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/XPathResult/snapshotItem)
44
+ */
45
+ @send
46
+ external snapshotItem: (t, int) => Null.t<DOMTree.node> = "snapshotItem"
@@ -0,0 +1,39 @@
1
+ type clientQueryOptions = {
2
+ mutable includeUncontrolled?: bool,
3
+ @as("type") mutable type_?: string,
4
+ }
5
+
6
+ /**
7
+ Returns a `Promise` for a `Client` matching a given id.
8
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Clients/get)
9
+ */
10
+ @send
11
+ external get: (ServiceWorkerTypes.clients, string) => promise<option<ServiceWorkerTypes.client>> =
12
+ "get"
13
+
14
+ /**
15
+ Returns a `Promise` for an array of `Client` objects matching the given options.
16
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Clients/matchAll)
17
+ */
18
+ @send
19
+ external matchAll: (
20
+ ServiceWorkerTypes.clients,
21
+ ~options: clientQueryOptions=?,
22
+ ) => promise<array<ServiceWorkerTypes.client>> = "matchAll"
23
+
24
+ /**
25
+ Opens a new browser window for a given WebApiURL and returns a `Promise` for the new `WindowClient`.
26
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Clients/openWindow)
27
+ */
28
+ @send
29
+ external openWindow: (
30
+ ServiceWorkerTypes.clients,
31
+ string,
32
+ ) => promise<Null.t<ServiceWorkerTypes.windowClient>> = "openWindow"
33
+
34
+ /**
35
+ Allows an active service worker to set itself as the controller for all clients within its scope.
36
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/Clients/claim)
37
+ */
38
+ @send
39
+ external claim: ServiceWorkerTypes.clients => promise<unit> = "claim"
@@ -0,0 +1,26 @@
1
+ /**
2
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/enable)
3
+ */
4
+ @send
5
+ external enable: ServiceWorkerTypes.navigationPreloadManager => promise<unit> = "enable"
6
+
7
+ /**
8
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/disable)
9
+ */
10
+ @send
11
+ external disable: ServiceWorkerTypes.navigationPreloadManager => promise<unit> = "disable"
12
+
13
+ /**
14
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/setHeaderValue)
15
+ */
16
+ @send
17
+ external setHeaderValue: (ServiceWorkerTypes.navigationPreloadManager, string) => promise<unit> =
18
+ "setHeaderValue"
19
+
20
+ /**
21
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/getState)
22
+ */
23
+ @send
24
+ external getState: ServiceWorkerTypes.navigationPreloadManager => promise<
25
+ ServiceWorkerTypes.navigationPreloadState,
26
+ > = "getState"