Window.hx 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. /*
  2. * Copyright (C)2005-2019 Haxe Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. package js.html;
  23. import js.lib.Promise;
  24. /**
  25. The `Window` interface represents a window containing a DOM document; the `document` property points to the DOM document loaded in that window.
  26. Documentation [Window](https://developer.mozilla.org/en-US/docs/Web/API/Window) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/Window$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
  27. @see <https://developer.mozilla.org/en-US/docs/Web/API/Window>
  28. **/
  29. @:native("Window")
  30. extern class Window extends EventTarget {
  31. /**
  32. Returns a reference to the current window.
  33. **/
  34. var window(default,null) : Window;
  35. /**
  36. Returns an object reference to the window object itself.
  37. **/
  38. var self(default,null) : Window;
  39. /**
  40. Returns a reference to the document that the window contains.
  41. **/
  42. var document(default,null) : HTMLDocument;
  43. /**
  44. Gets/sets the name of the window.
  45. **/
  46. var name : String;
  47. /**
  48. Gets/sets the location, or current URL, of the window object.
  49. **/
  50. var location(default,null) : Location;
  51. /**
  52. Returns a reference to the history object.
  53. **/
  54. var history(default,null) : History;
  55. /**
  56. Returns the locationbar object, whose visibility can be toggled in the window.
  57. **/
  58. var locationbar(default,null) : BarProp;
  59. /**
  60. Returns the menubar object, whose visibility can be toggled in the window.
  61. **/
  62. var menubar(default,null) : BarProp;
  63. /**
  64. Returns the personalbar object, whose visibility can be toggled in the window.
  65. **/
  66. var personalbar(default,null) : BarProp;
  67. /**
  68. Returns the scrollbars object, whose visibility can be toggled in the window.
  69. **/
  70. var scrollbars(default,null) : BarProp;
  71. /**
  72. Returns the statusbar object, whose visibility can be toggled in the window.
  73. **/
  74. var statusbar(default,null) : BarProp;
  75. /**
  76. Returns the toolbar object, whose visibility can be toggled in the window.
  77. **/
  78. var toolbar(default,null) : BarProp;
  79. /**
  80. Gets/sets the text in the statusbar at the bottom of the browser.
  81. **/
  82. var status : String;
  83. /**
  84. This property indicates whether the current window is closed or not.
  85. **/
  86. var closed(default,null) : Bool;
  87. /**
  88. Returns the current event, which is the event currently being handled by the JavaScript code's context, or `undefined` if no event is currently being handled. The `Event` object passed directly to event handlers should be used instead whenever possible.
  89. **/
  90. var event(default,null) : Dynamic;
  91. /**
  92. Returns an array of the subframes in the current window.
  93. **/
  94. var frames(default,null) : Window;
  95. /**
  96. Returns the number of frames in the window. See also `window.frames`.
  97. **/
  98. var length(default,null) : Int;
  99. /**
  100. Returns a reference to the topmost window in the window hierarchy. This property is read only.
  101. **/
  102. var top(default,null) : Window;
  103. /**
  104. Returns a reference to the window that opened this current window.
  105. **/
  106. var opener : Dynamic;
  107. /**
  108. Returns a reference to the parent of the current window or subframe.
  109. **/
  110. var parent(default,null) : Window;
  111. /**
  112. Returns the element in which the window is embedded, or null if the window is not embedded.
  113. **/
  114. var frameElement(default,null) : Element;
  115. /**
  116. Returns a reference to the navigator object.
  117. **/
  118. var navigator(default,null) : Navigator;
  119. /**
  120. Returns a reference to the console object which provides access to the browser's debugging console.
  121. **/
  122. var console(default,null) : ConsoleInstance;
  123. /**
  124. Returns a reference to the screen object associated with the window.
  125. **/
  126. var screen(default,null) : Screen;
  127. /**
  128. Gets the width of the content area of the browser window including, if rendered, the vertical scrollbar.
  129. **/
  130. var innerWidth : Dynamic;
  131. /**
  132. Gets the height of the content area of the browser window including, if rendered, the horizontal scrollbar.
  133. **/
  134. var innerHeight : Dynamic;
  135. /**
  136. Returns the number of pixels that the document has already been scrolled horizontally.
  137. **/
  138. var scrollX(default,null) : Float;
  139. /**
  140. An alias for `window.scrollX`.
  141. **/
  142. var pageXOffset(default,null) : Float;
  143. /**
  144. Returns the number of pixels that the document has already been scrolled vertically.
  145. **/
  146. var scrollY(default,null) : Float;
  147. /**
  148. An alias for `window.scrollY`
  149. **/
  150. var pageYOffset(default,null) : Float;
  151. /**
  152. Returns the horizontal distance of the left border of the user's browser from the left side of the screen.
  153. **/
  154. var screenX : Dynamic;
  155. /**
  156. Returns the vertical distance of the top border of the user's browser from the top side of the screen.
  157. **/
  158. var screenY : Dynamic;
  159. /**
  160. Gets the width of the outside of the browser window.
  161. **/
  162. var outerWidth : Dynamic;
  163. /**
  164. Gets the height of the outside of the browser window.
  165. **/
  166. var outerHeight : Dynamic;
  167. /**
  168. Returns a `Performance` object, which includes the `Performance.timing` and `Performance.navigation` attributes, each of which is an object providing performance-related data. See also Using Navigation Timing for additional information and examples.
  169. **/
  170. var performance(default,null) : Performance;
  171. /**
  172. Returns the ratio between physical pixels and device independent pixels in the current display.
  173. **/
  174. var devicePixelRatio(default,null) : Float;
  175. /**
  176. The maximum offset that the window can be scrolled to horizontally, that is the document width minus the viewport width.
  177. **/
  178. var scrollMaxX(default,null) : Int;
  179. /**
  180. The maximum offset that the window can be scrolled to vertically (i.e., the document height minus the viewport height).
  181. **/
  182. var scrollMaxY(default,null) : Int;
  183. /**
  184. This property indicates whether the window is displayed in full screen or not.
  185. **/
  186. var fullScreen : Bool;
  187. var ondevicemotion : haxe.Constraints.Function;
  188. var ondeviceorientation : haxe.Constraints.Function;
  189. var onabsolutedeviceorientation : haxe.Constraints.Function;
  190. var ondeviceproximity : haxe.Constraints.Function;
  191. var onuserproximity : haxe.Constraints.Function;
  192. var ondevicelight : haxe.Constraints.Function;
  193. /**
  194. Returns a reference to the content element in the current window. Since Firefox 57 (initially Nightly-only), both versions are only available from chrome (privileged) code, and not available to the web anymore.
  195. **/
  196. var content(default,null) : Dynamic;
  197. /**
  198. Returns the orientation in degrees (in 90 degree increments) of the viewport relative to the device's natural orientation.
  199. **/
  200. var orientation(default,null) : Int;
  201. var onorientationchange : haxe.Constraints.Function;
  202. /**
  203. Returns the browser crypto object.
  204. **/
  205. var crypto(default,null) : Crypto;
  206. var onabort : haxe.Constraints.Function;
  207. var onblur : haxe.Constraints.Function;
  208. var onfocus : haxe.Constraints.Function;
  209. var onauxclick : haxe.Constraints.Function;
  210. var oncanplay : haxe.Constraints.Function;
  211. var oncanplaythrough : haxe.Constraints.Function;
  212. var onchange : haxe.Constraints.Function;
  213. var onclick : haxe.Constraints.Function;
  214. var onclose : haxe.Constraints.Function;
  215. var oncontextmenu : haxe.Constraints.Function;
  216. var ondblclick : haxe.Constraints.Function;
  217. var ondrag : haxe.Constraints.Function;
  218. var ondragend : haxe.Constraints.Function;
  219. var ondragenter : haxe.Constraints.Function;
  220. var ondragexit : haxe.Constraints.Function;
  221. var ondragleave : haxe.Constraints.Function;
  222. var ondragover : haxe.Constraints.Function;
  223. var ondragstart : haxe.Constraints.Function;
  224. var ondrop : haxe.Constraints.Function;
  225. var ondurationchange : haxe.Constraints.Function;
  226. var onemptied : haxe.Constraints.Function;
  227. var onended : haxe.Constraints.Function;
  228. var oninput : haxe.Constraints.Function;
  229. var oninvalid : haxe.Constraints.Function;
  230. var onkeydown : haxe.Constraints.Function;
  231. var onkeypress : haxe.Constraints.Function;
  232. var onkeyup : haxe.Constraints.Function;
  233. var onload : haxe.Constraints.Function;
  234. var onloadeddata : haxe.Constraints.Function;
  235. var onloadedmetadata : haxe.Constraints.Function;
  236. var onloadend : haxe.Constraints.Function;
  237. var onloadstart : haxe.Constraints.Function;
  238. var onmousedown : haxe.Constraints.Function;
  239. var onmouseenter : haxe.Constraints.Function;
  240. var onmouseleave : haxe.Constraints.Function;
  241. var onmousemove : haxe.Constraints.Function;
  242. var onmouseout : haxe.Constraints.Function;
  243. var onmouseover : haxe.Constraints.Function;
  244. var onmouseup : haxe.Constraints.Function;
  245. var onwheel : haxe.Constraints.Function;
  246. var onpause : haxe.Constraints.Function;
  247. var onplay : haxe.Constraints.Function;
  248. var onplaying : haxe.Constraints.Function;
  249. var onprogress : haxe.Constraints.Function;
  250. var onratechange : haxe.Constraints.Function;
  251. var onreset : haxe.Constraints.Function;
  252. var onresize : haxe.Constraints.Function;
  253. var onscroll : haxe.Constraints.Function;
  254. var onseeked : haxe.Constraints.Function;
  255. var onseeking : haxe.Constraints.Function;
  256. var onselect : haxe.Constraints.Function;
  257. var onshow : haxe.Constraints.Function;
  258. var onstalled : haxe.Constraints.Function;
  259. var onsubmit : haxe.Constraints.Function;
  260. var onsuspend : haxe.Constraints.Function;
  261. var ontimeupdate : haxe.Constraints.Function;
  262. var onvolumechange : haxe.Constraints.Function;
  263. var onwaiting : haxe.Constraints.Function;
  264. var onselectstart : haxe.Constraints.Function;
  265. var ontoggle : haxe.Constraints.Function;
  266. var onpointercancel : haxe.Constraints.Function;
  267. var onpointerdown : haxe.Constraints.Function;
  268. var onpointerup : haxe.Constraints.Function;
  269. var onpointermove : haxe.Constraints.Function;
  270. var onpointerout : haxe.Constraints.Function;
  271. var onpointerover : haxe.Constraints.Function;
  272. var onpointerenter : haxe.Constraints.Function;
  273. var onpointerleave : haxe.Constraints.Function;
  274. var ongotpointercapture : haxe.Constraints.Function;
  275. var onlostpointercapture : haxe.Constraints.Function;
  276. var onanimationcancel : haxe.Constraints.Function;
  277. var onanimationend : haxe.Constraints.Function;
  278. var onanimationiteration : haxe.Constraints.Function;
  279. var onanimationstart : haxe.Constraints.Function;
  280. var ontransitioncancel : haxe.Constraints.Function;
  281. var ontransitionend : haxe.Constraints.Function;
  282. var ontransitionrun : haxe.Constraints.Function;
  283. var ontransitionstart : haxe.Constraints.Function;
  284. var onwebkitanimationend : haxe.Constraints.Function;
  285. var onwebkitanimationiteration : haxe.Constraints.Function;
  286. var onwebkitanimationstart : haxe.Constraints.Function;
  287. var onwebkittransitionend : haxe.Constraints.Function;
  288. var onerror : haxe.extern.EitherType<Event,String> -> String -> Int -> Int -> Dynamic -> Dynamic;
  289. /**
  290. Returns a `SpeechSynthesis` object, which is the entry point into using Web Speech API speech synthesis functionality.
  291. **/
  292. var speechSynthesis(default,null) : SpeechSynthesis;
  293. var ontouchstart : haxe.Constraints.Function;
  294. var ontouchend : haxe.Constraints.Function;
  295. var ontouchmove : haxe.Constraints.Function;
  296. var ontouchcancel : haxe.Constraints.Function;
  297. var onafterprint : haxe.Constraints.Function;
  298. var onbeforeprint : haxe.Constraints.Function;
  299. var onbeforeunload : Event -> Null<String>;
  300. var onhashchange : haxe.Constraints.Function;
  301. var onlanguagechange : haxe.Constraints.Function;
  302. var onmessage : haxe.Constraints.Function;
  303. var onmessageerror : haxe.Constraints.Function;
  304. var onoffline : haxe.Constraints.Function;
  305. var ononline : haxe.Constraints.Function;
  306. var onpagehide : haxe.Constraints.Function;
  307. var onpageshow : haxe.Constraints.Function;
  308. var onpopstate : haxe.Constraints.Function;
  309. var onstorage : haxe.Constraints.Function;
  310. var onunload : haxe.Constraints.Function;
  311. /**
  312. Returns a reference to the local storage object used to store data that may only be accessed by the origin that created it.
  313. **/
  314. var localStorage(default,null) : Storage;
  315. var origin(default,null) : String;
  316. /**
  317. Indicates whether a context is capable of using features that require secure contexts.
  318. **/
  319. var isSecureContext(default,null) : Bool;
  320. var indexedDB(default,null) : js.html.idb.Factory;
  321. var caches(default,null) : CacheStorage;
  322. /**
  323. Returns a reference to the session storage object used to store data that may only be accessed by the origin that created it.
  324. **/
  325. var sessionStorage(default,null) : Storage;
  326. /**
  327. Closes the current window.
  328. @throws DOMError
  329. **/
  330. function close() : Void;
  331. /**
  332. This method stops window loading.
  333. @throws DOMError
  334. **/
  335. function stop() : Void;
  336. /**
  337. Sets focus on the current window.
  338. @throws DOMError
  339. **/
  340. function focus() : Void;
  341. /**
  342. Sets focus away from the window.
  343. @throws DOMError
  344. **/
  345. function blur() : Void;
  346. /**
  347. Opens a new window.
  348. @throws DOMError
  349. **/
  350. function open( url : String = "", target : String = "", features : String = "" ) : Window;
  351. /**
  352. Displays an alert dialog.
  353. @throws DOMError
  354. **/
  355. @:overload( function() : Void {} )
  356. function alert( message : String ) : Void;
  357. /**
  358. Displays a dialog with a message that the user needs to respond to.
  359. @throws DOMError
  360. **/
  361. function confirm( message : String = "" ) : Bool;
  362. /**
  363. Returns the text entered by the user in a prompt dialog.
  364. @throws DOMError
  365. **/
  366. function prompt( message : String = "", default_ : String = "" ) : String;
  367. /**
  368. Opens the Print Dialog to print the current document.
  369. @throws DOMError
  370. **/
  371. function print() : Void;
  372. /**
  373. Provides a secure means for one window to send a string of data to another window, which need not be within the same domain as the first.
  374. @throws DOMError
  375. **/
  376. function postMessage( message : Dynamic, targetOrigin : String, ?transfer : Array<Dynamic> ) : Void;
  377. /**
  378. Registers the window to capture all events of the specified type.
  379. **/
  380. function captureEvents() : Void;
  381. /**
  382. Releases the window from trapping events of a specific type.
  383. **/
  384. function releaseEvents() : Void;
  385. /**
  386. Returns the selection object representing the selected item(s).
  387. @throws DOMError
  388. **/
  389. function getSelection() : Selection;
  390. /**
  391. Gets computed style for the specified element. Computed style indicates the computed values of all CSS properties of the element.
  392. @throws DOMError
  393. **/
  394. function getComputedStyle( elt : Element, pseudoElt : String = "" ) : CSSStyleDeclaration;
  395. /**
  396. Returns a `MediaQueryList` object representing the specified media query string.
  397. @throws DOMError
  398. **/
  399. function matchMedia( query : String ) : MediaQueryList;
  400. /**
  401. Moves the window to the specified coordinates.
  402. @throws DOMError
  403. **/
  404. function moveTo( x : Int, y : Int ) : Void;
  405. /**
  406. Moves the current window by a specified amount.
  407. @throws DOMError
  408. **/
  409. function moveBy( x : Int, y : Int ) : Void;
  410. /**
  411. Dynamically resizes window.
  412. @throws DOMError
  413. **/
  414. function resizeTo( x : Int, y : Int ) : Void;
  415. /**
  416. Resizes the current window by a certain amount.
  417. @throws DOMError
  418. **/
  419. function resizeBy( x : Int, y : Int ) : Void;
  420. /**
  421. Scrolls the window to a particular place in the document.
  422. **/
  423. @:overload( function( x : Float, y : Float ) : Void {} )
  424. function scroll( ?options : ScrollToOptions ) : Void;
  425. /**
  426. Scrolls to a particular set of coordinates in the document.
  427. **/
  428. @:overload( function( x : Float, y : Float ) : Void {} )
  429. function scrollTo( ?options : ScrollToOptions ) : Void;
  430. /**
  431. Scrolls the document in the window by the given amount.
  432. **/
  433. @:overload( function( x : Float, y : Float ) : Void {} )
  434. function scrollBy( ?options : ScrollToOptions ) : Void;
  435. /**
  436. Tells the browser that an animation is in progress, requesting that the browser schedule a repaint of the window for the next animation frame.
  437. @throws DOMError
  438. **/
  439. function requestAnimationFrame( callback : Float -> Void ) : Int;
  440. /**
  441. Enables you to cancel a callback previously scheduled with `Window.requestAnimationFrame`.
  442. @throws DOMError
  443. **/
  444. function cancelAnimationFrame( handle : Int ) : Void;
  445. /**
  446. Gets default computed style for the specified element, ignoring author stylesheets.
  447. @throws DOMError
  448. **/
  449. function getDefaultComputedStyle( elt : Element, pseudoElt : String = "" ) : CSSStyleDeclaration;
  450. /**
  451. Scrolls the document by the given number of lines.
  452. **/
  453. function scrollByLines( numLines : Int, ?options : ScrollOptions ) : Void;
  454. /**
  455. Scrolls the current document by the specified number of pages.
  456. **/
  457. function scrollByPages( numPages : Int, ?options : ScrollOptions ) : Void;
  458. /**
  459. Sizes the window according to its content.
  460. @throws DOMError
  461. **/
  462. function sizeToContent() : Void;
  463. /**
  464. Updates the state of commands of the current chrome window (UI).
  465. **/
  466. function updateCommands( action : String, ?sel : Selection, reason : Int = 0 ) : Void;
  467. /**
  468. Searches for a given string in a window.
  469. @throws DOMError
  470. **/
  471. function find( str : String = "", caseSensitive : Bool = false, backwards : Bool = false, wrapAround : Bool = false, wholeWord : Bool = false, searchInFrames : Bool = false, showDialog : Bool = false ) : Bool;
  472. /**
  473. Writes a message to the console.
  474. **/
  475. function dump( str : String ) : Void;
  476. /**
  477. Creates a deep clone of a given value using the structured clone algorithm.
  478. **/
  479. function structuredClone<T>(value: T, ?options: {transfer: Array<Any>}): T;
  480. /**
  481. Toggles a user's ability to resize a window.
  482. **/
  483. function setResizable( resizable : Bool ) : Void;
  484. /** @throws DOMError */
  485. function btoa( btoa : String ) : String;
  486. /** @throws DOMError */
  487. function atob( atob : String ) : String;
  488. /** @throws DOMError */
  489. @:overload( function( handler : haxe.Constraints.Function, timeout : Float = 0, arguments : haxe.extern.Rest<Dynamic> ) : Int {} )
  490. function setTimeout( handler : String, timeout : Float = 0, unused : haxe.extern.Rest<Dynamic> ) : Int;
  491. function clearTimeout( handle : Int = 0 ) : Void;
  492. /** @throws DOMError */
  493. @:overload( function( handler : haxe.Constraints.Function, timeout : Float = 0, arguments : haxe.extern.Rest<Dynamic> ) : Int {} )
  494. function setInterval( handler : String, timeout : Float = 0, unused : haxe.extern.Rest<Dynamic> ) : Int;
  495. function clearInterval( handle : Int = 0 ) : Void;
  496. /** @throws DOMError */
  497. @:overload( function( aImage : VideoElement) : Promise<ImageBitmap> {} )
  498. @:overload( function( aImage : CanvasElement) : Promise<ImageBitmap> {} )
  499. @:overload( function( aImage : Blob) : Promise<ImageBitmap> {} )
  500. @:overload( function( aImage : ImageData) : Promise<ImageBitmap> {} )
  501. @:overload( function( aImage : CanvasRenderingContext2D) : Promise<ImageBitmap> {} )
  502. @:overload( function( aImage : ImageBitmap) : Promise<ImageBitmap> {} )
  503. @:overload( function( aImage : js.lib.ArrayBufferView) : Promise<ImageBitmap> {} )
  504. @:overload( function( aImage : js.lib.ArrayBuffer) : Promise<ImageBitmap> {} )
  505. @:overload( function( aImage : VideoElement, aSx : Int, aSy : Int, aSw : Int, aSh : Int) : Promise<ImageBitmap> {} )
  506. @:overload( function( aImage : CanvasElement, aSx : Int, aSy : Int, aSw : Int, aSh : Int) : Promise<ImageBitmap> {} )
  507. @:overload( function( aImage : Blob, aSx : Int, aSy : Int, aSw : Int, aSh : Int) : Promise<ImageBitmap> {} )
  508. @:overload( function( aImage : ImageData, aSx : Int, aSy : Int, aSw : Int, aSh : Int) : Promise<ImageBitmap> {} )
  509. @:overload( function( aImage : CanvasRenderingContext2D, aSx : Int, aSy : Int, aSw : Int, aSh : Int) : Promise<ImageBitmap> {} )
  510. @:overload( function( aImage : ImageBitmap, aSx : Int, aSy : Int, aSw : Int, aSh : Int) : Promise<ImageBitmap> {} )
  511. @:overload( function( aImage : js.lib.ArrayBufferView, aSx : Int, aSy : Int, aSw : Int, aSh : Int) : Promise<ImageBitmap> {} )
  512. @:overload( function( aImage : js.lib.ArrayBuffer, aSx : Int, aSy : Int, aSw : Int, aSh : Int) : Promise<ImageBitmap> {} )
  513. @:overload( function( aImage : VideoElement, aOffset : Int, aLength : Int, aFormat : ImageBitmapFormat, aLayout : Array<ChannelPixelLayout>) : Promise<ImageBitmap> {} )
  514. @:overload( function( aImage : CanvasElement, aOffset : Int, aLength : Int, aFormat : ImageBitmapFormat, aLayout : Array<ChannelPixelLayout>) : Promise<ImageBitmap> {} )
  515. @:overload( function( aImage : Blob, aOffset : Int, aLength : Int, aFormat : ImageBitmapFormat, aLayout : Array<ChannelPixelLayout>) : Promise<ImageBitmap> {} )
  516. @:overload( function( aImage : ImageData, aOffset : Int, aLength : Int, aFormat : ImageBitmapFormat, aLayout : Array<ChannelPixelLayout>) : Promise<ImageBitmap> {} )
  517. @:overload( function( aImage : CanvasRenderingContext2D, aOffset : Int, aLength : Int, aFormat : ImageBitmapFormat, aLayout : Array<ChannelPixelLayout>) : Promise<ImageBitmap> {} )
  518. @:overload( function( aImage : ImageBitmap, aOffset : Int, aLength : Int, aFormat : ImageBitmapFormat, aLayout : Array<ChannelPixelLayout>) : Promise<ImageBitmap> {} )
  519. @:overload( function( aImage : js.lib.ArrayBufferView, aOffset : Int, aLength : Int, aFormat : ImageBitmapFormat, aLayout : Array<ChannelPixelLayout>) : Promise<ImageBitmap> {} )
  520. @:overload( function( aImage : js.lib.ArrayBuffer, aOffset : Int, aLength : Int, aFormat : ImageBitmapFormat, aLayout : Array<ChannelPixelLayout>) : Promise<ImageBitmap> {} )
  521. @:overload( function( aImage : ImageElement ) : Promise<ImageBitmap> {} )
  522. @:overload( function( aImage : ImageElement, aSx : Int, aSy : Int, aSw : Int, aSh : Int ) : Promise<ImageBitmap> {} )
  523. function createImageBitmap( aImage : ImageElement, aOffset : Int, aLength : Int, aFormat : ImageBitmapFormat, aLayout : Array<ChannelPixelLayout> ) : Promise<ImageBitmap>;
  524. @:overload( function( input : String, ?init : RequestInit) : Promise<Response> {} )
  525. function fetch( input : Request, ?init : RequestInit ) : Promise<Response>;
  526. }