|
| 1 | +open DOMAPI |
| 2 | +open HistoryAPI |
| 3 | +open VisualViewportAPI |
| 4 | +open WebSpeechAPI |
| 5 | +open IndexedDBAPI |
| 6 | +open WebCryptoAPI |
| 7 | +open PerformanceAPI |
| 8 | +open ServiceWorkerAPI |
| 9 | +open WebStorageAPI |
| 10 | +open CanvasAPI |
| 11 | +open FileAPI |
| 12 | +open ChannelMessagingAPI |
| 13 | +open FetchAPI |
| 14 | +open EventAPI |
| 15 | + |
| 16 | +external window: window = "window" |
| 17 | +external self: window = "self" |
| 18 | +external document: document = "document" |
| 19 | +external name: string = "name" |
| 20 | +external location: location = "location" |
| 21 | +external history: history = "history" |
| 22 | +external customElements: customElementRegistry = "customElements" |
| 23 | +external locationbar: barProp = "locationbar" |
| 24 | +external menubar: barProp = "menubar" |
| 25 | +external personalbar: barProp = "personalbar" |
| 26 | +external scrollbars: barProp = "scrollbars" |
| 27 | +external statusbar: barProp = "statusbar" |
| 28 | +external toolbar: barProp = "toolbar" |
| 29 | +external closed: bool = "closed" |
| 30 | +external frames: window = "frames" |
| 31 | +external length: int = "length" |
| 32 | +external top: window = "top" |
| 33 | +external opener: JSON.t = "opener" |
| 34 | +external parent: window = "parent" |
| 35 | +external frameElement: element = "frameElement" |
| 36 | +external navigator: navigator = "navigator" |
| 37 | +external screen: screen = "screen" |
| 38 | +external visualViewport: visualViewport = "visualViewport" |
| 39 | +external innerWidth: int = "innerWidth" |
| 40 | +external innerHeight: int = "innerHeight" |
| 41 | +external scrollX: float = "scrollX" |
| 42 | +external scrollY: float = "scrollY" |
| 43 | +external screenX: int = "screenX" |
| 44 | +external screenLeft: int = "screenLeft" |
| 45 | +external screenY: int = "screenY" |
| 46 | +external screenTop: int = "screenTop" |
| 47 | +external outerWidth: int = "outerWidth" |
| 48 | +external outerHeight: int = "outerHeight" |
| 49 | +external devicePixelRatio: float = "devicePixelRatio" |
| 50 | +external speechSynthesis: speechSynthesis = "speechSynthesis" |
| 51 | +external origin: string = "origin" |
| 52 | +external isSecureContext: bool = "isSecureContext" |
| 53 | +external crossOriginIsolated: bool = "crossOriginIsolated" |
| 54 | +external indexedDB: idbFactory = "indexedDB" |
| 55 | +external crypto: crypto = "crypto" |
| 56 | +external performance: performance = "performance" |
| 57 | +external caches: cacheStorage = "caches" |
| 58 | +external sessionStorage: storage = "sessionStorage" |
| 59 | +external localStorage: storage = "localStorage" |
| 60 | + |
| 61 | +external reportError: JSON.t => unit = "reportError" |
| 62 | + |
| 63 | +external btoa: string => string = "btoa" |
| 64 | + |
| 65 | +external atob: string => string = "atob" |
| 66 | + |
| 67 | +external setTimeout: (~handler: string, ~timeout: int=?) => int = "setTimeout" |
| 68 | + |
| 69 | +external setTimeout2: (~handler: unit => unit, ~timeout: int=?) => int = "setTimeout" |
| 70 | + |
| 71 | +external clearTimeout: int => unit = "clearTimeout" |
| 72 | + |
| 73 | +external setInterval: (~handler: string, ~timeout: int=?) => int = "setInterval" |
| 74 | + |
| 75 | +external setInterval2: (~handler: unit => unit, ~timeout: int=?) => int = "setInterval" |
| 76 | + |
| 77 | +external clearInterval: int => unit = "clearInterval" |
| 78 | + |
| 79 | +external queueMicrotask: voidFunction => unit = "queueMicrotask" |
| 80 | + |
| 81 | +external createImageBitmap: ( |
| 82 | + ~image: htmlImageElement, |
| 83 | + ~options: imageBitmapOptions=?, |
| 84 | +) => Promise.t<imageBitmap> = "createImageBitmap" |
| 85 | + |
| 86 | +external createImageBitmap2: ( |
| 87 | + ~image: svgImageElement, |
| 88 | + ~options: imageBitmapOptions=?, |
| 89 | +) => Promise.t<imageBitmap> = "createImageBitmap" |
| 90 | + |
| 91 | +external createImageBitmap3: ( |
| 92 | + ~image: htmlVideoElement, |
| 93 | + ~options: imageBitmapOptions=?, |
| 94 | +) => Promise.t<imageBitmap> = "createImageBitmap" |
| 95 | + |
| 96 | +external createImageBitmap4: ( |
| 97 | + ~image: htmlCanvasElement, |
| 98 | + ~options: imageBitmapOptions=?, |
| 99 | +) => Promise.t<imageBitmap> = "createImageBitmap" |
| 100 | + |
| 101 | +external createImageBitmap5: ( |
| 102 | + ~image: imageBitmap, |
| 103 | + ~options: imageBitmapOptions=?, |
| 104 | +) => Promise.t<imageBitmap> = "createImageBitmap" |
| 105 | + |
| 106 | +external createImageBitmap6: ( |
| 107 | + ~image: offscreenCanvas, |
| 108 | + ~options: imageBitmapOptions=?, |
| 109 | +) => Promise.t<imageBitmap> = "createImageBitmap" |
| 110 | + |
| 111 | +external createImageBitmap7: ( |
| 112 | + ~image: videoFrame, |
| 113 | + ~options: imageBitmapOptions=?, |
| 114 | +) => Promise.t<imageBitmap> = "createImageBitmap" |
| 115 | + |
| 116 | +external createImageBitmap8: ( |
| 117 | + ~image: blob, |
| 118 | + ~options: imageBitmapOptions=?, |
| 119 | +) => Promise.t<imageBitmap> = "createImageBitmap" |
| 120 | + |
| 121 | +external createImageBitmap9: ( |
| 122 | + ~image: imageData, |
| 123 | + ~options: imageBitmapOptions=?, |
| 124 | +) => Promise.t<imageBitmap> = "createImageBitmap" |
| 125 | + |
| 126 | +external createImageBitmap10: ( |
| 127 | + ~image: htmlImageElement, |
| 128 | + ~sx: int, |
| 129 | + ~sy: int, |
| 130 | + ~sw: int, |
| 131 | + ~sh: int, |
| 132 | + ~options: imageBitmapOptions=?, |
| 133 | +) => Promise.t<imageBitmap> = "createImageBitmap" |
| 134 | + |
| 135 | +external createImageBitmap11: ( |
| 136 | + ~image: svgImageElement, |
| 137 | + ~sx: int, |
| 138 | + ~sy: int, |
| 139 | + ~sw: int, |
| 140 | + ~sh: int, |
| 141 | + ~options: imageBitmapOptions=?, |
| 142 | +) => Promise.t<imageBitmap> = "createImageBitmap" |
| 143 | + |
| 144 | +external createImageBitmap12: ( |
| 145 | + ~image: htmlVideoElement, |
| 146 | + ~sx: int, |
| 147 | + ~sy: int, |
| 148 | + ~sw: int, |
| 149 | + ~sh: int, |
| 150 | + ~options: imageBitmapOptions=?, |
| 151 | +) => Promise.t<imageBitmap> = "createImageBitmap" |
| 152 | + |
| 153 | +external createImageBitmap13: ( |
| 154 | + ~image: htmlCanvasElement, |
| 155 | + ~sx: int, |
| 156 | + ~sy: int, |
| 157 | + ~sw: int, |
| 158 | + ~sh: int, |
| 159 | + ~options: imageBitmapOptions=?, |
| 160 | +) => Promise.t<imageBitmap> = "createImageBitmap" |
| 161 | + |
| 162 | +external createImageBitmap14: ( |
| 163 | + ~image: imageBitmap, |
| 164 | + ~sx: int, |
| 165 | + ~sy: int, |
| 166 | + ~sw: int, |
| 167 | + ~sh: int, |
| 168 | + ~options: imageBitmapOptions=?, |
| 169 | +) => Promise.t<imageBitmap> = "createImageBitmap" |
| 170 | + |
| 171 | +external createImageBitmap15: ( |
| 172 | + ~image: offscreenCanvas, |
| 173 | + ~sx: int, |
| 174 | + ~sy: int, |
| 175 | + ~sw: int, |
| 176 | + ~sh: int, |
| 177 | + ~options: imageBitmapOptions=?, |
| 178 | +) => Promise.t<imageBitmap> = "createImageBitmap" |
| 179 | + |
| 180 | +external createImageBitmap16: ( |
| 181 | + ~image: videoFrame, |
| 182 | + ~sx: int, |
| 183 | + ~sy: int, |
| 184 | + ~sw: int, |
| 185 | + ~sh: int, |
| 186 | + ~options: imageBitmapOptions=?, |
| 187 | +) => Promise.t<imageBitmap> = "createImageBitmap" |
| 188 | + |
| 189 | +external createImageBitmap17: ( |
| 190 | + ~image: blob, |
| 191 | + ~sx: int, |
| 192 | + ~sy: int, |
| 193 | + ~sw: int, |
| 194 | + ~sh: int, |
| 195 | + ~options: imageBitmapOptions=?, |
| 196 | +) => Promise.t<imageBitmap> = "createImageBitmap" |
| 197 | + |
| 198 | +external createImageBitmap18: ( |
| 199 | + ~image: imageData, |
| 200 | + ~sx: int, |
| 201 | + ~sy: int, |
| 202 | + ~sw: int, |
| 203 | + ~sh: int, |
| 204 | + ~options: imageBitmapOptions=?, |
| 205 | +) => Promise.t<imageBitmap> = "createImageBitmap" |
| 206 | + |
| 207 | +external structuredClone: ('t, ~options: structuredSerializeOptions=?) => 't = "structuredClone" |
| 208 | + |
| 209 | +external fetch: (~input: request, ~init: requestInit=?) => Promise.t<response> = "fetch" |
| 210 | + |
| 211 | +external fetch2: (~input: string, ~init: requestInit=?) => Promise.t<response> = "fetch" |
| 212 | + |
| 213 | +external requestAnimationFrame: frameRequestCallback => int = "requestAnimationFrame" |
| 214 | + |
| 215 | +external cancelAnimationFrame: int => unit = "cancelAnimationFrame" |
| 216 | + |
| 217 | +external addEventListener: ( |
| 218 | + ~type_: string, |
| 219 | + ~callback: eventListener<'event>, |
| 220 | + ~options: addEventListenerOptions=?, |
| 221 | +) => unit = "addEventListener" |
| 222 | + |
| 223 | +external addEventListener2: ( |
| 224 | + ~type_: string, |
| 225 | + ~callback: eventListener<'event>, |
| 226 | + ~options: bool=?, |
| 227 | +) => unit = "addEventListener" |
| 228 | + |
| 229 | +external removeEventListener: ( |
| 230 | + ~type_: string, |
| 231 | + ~callback: eventListener<'event>, |
| 232 | + ~options: eventListenerOptions=?, |
| 233 | +) => unit = "removeEventListener" |
| 234 | + |
| 235 | +external removeEventListener2: ( |
| 236 | + ~type_: string, |
| 237 | + ~callback: eventListener<'event>, |
| 238 | + ~options: bool=?, |
| 239 | +) => unit = "removeEventListener" |
| 240 | + |
| 241 | +external dispatchEvent: event => bool = "dispatchEvent" |
| 242 | + |
| 243 | +external close: unit => unit = "close" |
| 244 | + |
| 245 | +external stop: unit => unit = "stop" |
| 246 | + |
| 247 | +external focus: unit => unit = "focus" |
| 248 | + |
| 249 | +external open_: (~url: string=?, ~target: string=?, ~features: string=?) => window = "open" |
| 250 | + |
| 251 | +external alert: unit => unit = "alert" |
| 252 | + |
| 253 | +external alert2: string => unit = "alert" |
| 254 | + |
| 255 | +external confirm: (~message: string=?) => bool = "confirm" |
| 256 | + |
| 257 | +external prompt: (~message: string=?, ~default: string=?) => string = "prompt" |
| 258 | + |
| 259 | +external print: unit => unit = "print" |
| 260 | + |
| 261 | +external postMessage: ( |
| 262 | + ~message: JSON.t, |
| 263 | + ~targetOrigin: string, |
| 264 | + ~transfer: array<Dict.t<string>>=?, |
| 265 | +) => unit = "postMessage" |
| 266 | + |
| 267 | +external postMessage2: (~message: JSON.t, ~options: windowPostMessageOptions=?) => unit = |
| 268 | + "postMessage" |
| 269 | + |
| 270 | +external matchMedia: string => mediaQueryList = "matchMedia" |
| 271 | + |
| 272 | +external moveTo: (~x: int, ~y: int) => unit = "moveTo" |
| 273 | + |
| 274 | +external moveBy: (~x: int, ~y: int) => unit = "moveBy" |
| 275 | + |
| 276 | +external resizeTo: (~width: int, ~height: int) => unit = "resizeTo" |
| 277 | + |
| 278 | +external resizeBy: (~x: int, ~y: int) => unit = "resizeBy" |
| 279 | + |
| 280 | +external scroll: (~options: scrollToOptions=?) => unit = "scroll" |
| 281 | + |
| 282 | +external scroll2: (~x: float, ~y: float) => unit = "scroll" |
| 283 | + |
| 284 | +external scrollTo: (~options: scrollToOptions=?) => unit = "scrollTo" |
| 285 | + |
| 286 | +external scrollTo2: (~x: float, ~y: float) => unit = "scrollTo" |
| 287 | + |
| 288 | +external scrollBy: (~options: scrollToOptions=?) => unit = "scrollBy" |
| 289 | + |
| 290 | +external scrollBy2: (~x: float, ~y: float) => unit = "scrollBy" |
| 291 | + |
| 292 | +external getComputedStyle: (~elt: element, ~pseudoElt: string=?) => cssStyleDeclaration = |
| 293 | + "getComputedStyle" |
| 294 | + |
| 295 | +external requestIdleCallback: ( |
| 296 | + ~callback: idleRequestCallback, |
| 297 | + ~options: idleRequestOptions=?, |
| 298 | +) => int = "requestIdleCallback" |
| 299 | + |
| 300 | +external cancelIdleCallback: int => unit = "cancelIdleCallback" |
| 301 | + |
| 302 | +external getSelection: unit => selection = "getSelection" |
0 commit comments