package js.html
extends EventTarget
Available on jsThe
windowobject represents a window containing a DOM document; thedocumentproperty points to the DOM document loaded in that window.Documentation Window by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See:
read only closed:BoolThis property indicates whether the current window is closed or not.
read only console:ConsoleReturns a reference to the console object which provides access to the browser's debugging console.
read only content:DynamicReturns a reference to the content element in the current window. The obsolete variant with underscore is no longer available from Web content.
read only crypto:CryptoReturns the browser crypto object.
read only devicePixelRatio:FloatReturns the ratio between physical pixels and device independent pixels in the current display.
read only document:HTMLDocumentReturns a reference to the document that the window contains.
read only frameElement:ElementReturns the element in which the window is embedded, or null if the window is not embedded.
read only frames:WindowReturns an array of the subframes in the current window.
fullScreen:BoolThis property indicates whether the window is displayed in full screen or not.
read only history:HistoryReturns a reference to the history object.
read only indexedDB:FactoryinnerHeight:DynamicGets the height of the content area of the browser window including, if rendered, the horizontal scrollbar.
innerWidth:DynamicGets the width of the content area of the browser window including, if rendered, the vertical scrollbar.
read only length:IntReturns the number of frames in the window. See also window.frames.
read only localStorage:StorageReturns a reference to the local storage object used to store data that may only be accessed by the origin that created it.
read only location:LocationGets/sets the location, or current URL, of the window object.
read only locationbar:BarPropReturns the locationbar object, whose visibility can be toggled in the window.
read only menubar:BarPropReturns the menubar object, whose visibility can be toggled in the window.
name:StringGets/sets the name of the window.
read only navigator:NavigatorReturns a reference to the navigator object.
onabort:Functiononabsolutedeviceorientation:Functiononafterprint:Functiononbeforeprint:Functiononblur:Functiononcanplay:Functiononcanplaythrough:Functiononchange:Functiononclick:Functiononcontextmenu:Functionondblclick:Functionondevicelight:Functionondevicemotion:Functionondeviceorientation:Functionondeviceproximity:Functionondrag:Functionondragend:Functionondragenter:Functionondragleave:Functionondragover:Functionondragstart:Functionondrop:Functionondurationchange:Functiononemptied:Functiononended:Functiononfocus:Functiononfullscreenchange:Functiononfullscreenerror:Functionongotpointercapture:Functiononhashchange:Functiononinput:Functiononinvalid:Functiononkeydown:Functiononkeypress:Functiononkeyup:Functiononlanguagechange:Functiononload:Functiononloadeddata:Functiononloadedmetadata:Functiononloadstart:Functiononlostpointercapture:Functiononmessage:Functiononmousedown:Functiononmouseenter:Functiononmouseleave:Functiononmousemove:Functiononmouseout:Functiononmouseover:Functiononmouseup:Functiononoffline:Functionononline:Functiononorientationchange:Functiononpagehide:Functiononpageshow:Functiononpause:Functiononplay:Functiononplaying:Functiononpointercancel:Functiononpointerdown:Functiononpointerenter:Functiononpointerleave:Functiononpointerlockchange:Functiononpointerlockerror:Functiononpointermove:Functiononpointerout:Functiononpointerover:Functiononpointerup:Functiononpopstate:Functiononprogress:Functiononratechange:Functiononreset:Functiononresize:Functiononscroll:Functiononseeked:Functiononseeking:Functiononselect:Functiononshow:Functiononstalled:Functiononstorage:Functiononsubmit:Functiononsuspend:Functionontimeupdate:Functionontouchcancel:Functionontouchend:Functionontouchmove:Functionontouchstart:Functiononunload:Functiononuserproximity:Functiononvolumechange:Functiononwaiting:Functiononwheel:Functionopener:DynamicReturns a reference to the window that opened this current window.
read only orientation:IntReturns the orientation in degrees (in 90 degree increments) of the viewport relative to the device's natural orientation.
outerHeight:DynamicGets the height of the outside of the browser window.
outerWidth:DynamicGets the width of the outside of the browser window.
read only pageXOffset:Intread only pageYOffset:Intread only parent:WindowReturns a reference to the parent of the current window or subframe.
read only performance:PerformanceProvides a hosting area for performance related attributes.
read only personalbar:BarPropReturns the personalbar object, whose visibility can be toggled in the window.
read only screen:ScreenReturns a reference to the screen object associated with the window.
screenX:DynamicReturns the horizontal distance of the left border of the user's browser from the left side of the screen.
screenY:DynamicReturns the vertical distance of the top border of the user's browser from the top side of the screen.
read only scrollMaxX:IntThe maximum offset that the window can be scrolled to horizontally, that is the document width minus the viewport width.
read only scrollMaxY:IntThe maximum offset that the window can be scrolled to vertically (i.e., the document height minus the viewport height).
read only scrollX:IntReturns the number of pixels that the document has already been scrolled horizontally.
read only scrollY:IntReturns the number of pixels that the document has already been scrolled vertically.
read only scrollbars:BarPropReturns the scrollbars object, whose visibility can be toggled in the window.
read only self:WindowReturns an object reference to the window object itself.
read only sessionStorage:StorageReturns a storage object for storing data within a single page session.
read only speechSynthesis:SpeechSynthesisReturns a SpeechSynthesis object, which is the entry point into using Web Speech API speech synthesis functionality.
status:StringGets/sets the text in the statusbar at the bottom of the browser.
read only statusbar:BarPropReturns the statusbar object, whose visibility can be toggled in the window.
read only toolbar:BarPropReturns the toolbar object, whose visibility can be toggled in the window.
read only top:WindowReturns a reference to the topmost window in the window hierarchy. This property is read only.
read only window:WindowReturns a reference to the current window.
onbeforeunload:Event ‑> Stringonerror:EitherType<Event, String> ‑> String ‑> Int ‑> Int ‑> Dynamic ‑> Boolalert (message:String):Voidalert ():VoidThrows:
null |
DOMError |
|---|
atob (atob:String):StringThrows:
null |
DOMError |
|---|
blur ():VoidThrows:
null |
DOMError |
|---|
btoa (btoa:String):StringThrows:
null |
DOMError |
|---|
cancelAnimationFrame (handle:Int):VoidThrows:
null |
DOMError |
|---|
captureEvents ():VoidRegisters the window to capture all events of the specified type.
clearInterval (handle:Int = 0):Void clearTimeout (handle:Int = 0):Voidclose ():VoidThrows:
null |
DOMError |
|---|
confirm (message:String = ""):BoolThrows:
null |
DOMError |
|---|
createImageBitmap (aImage:EitherType<ImageElement, EitherType<VideoElement, EitherType<CanvasElement, EitherType<Blob, EitherType<ImageData, EitherType<CanvasRenderingContext2D, ImageBitmap>>>>>>, aSx:Int, aSy:Int, aSw:Int, aSh:Int):Promise<ImageBitmap>createImageBitmap (aImage:EitherType<ImageElement, EitherType<VideoElement, EitherType<CanvasElement, EitherType<Blob, EitherType<ImageData, EitherType<CanvasRenderingContext2D, ImageBitmap>>>>>>):Promise<ImageBitmap>Throws:
null |
DOMError |
|---|
dump (str:String):VoidWrites a message to the console.
fetch (input:EitherType<Request, String>, ?init:RequestInit):Promise<Response>Throws:
null |
DOMError |
|---|
find (str:String = "", caseSensitive:Bool = false, backwards:Bool = false, wrapAround:Bool = false, wholeWord:Bool = false, searchInFrames:Bool = false, showDialog:Bool = false):BoolThrows:
null |
DOMError |
|---|
focus ():VoidThrows:
null |
DOMError |
|---|
getComputedStyle (elt:Element, pseudoElt:String = ""):CSSStyleDeclarationThrows:
null |
DOMError |
|---|
getDefaultComputedStyle (elt:Element, pseudoElt:String = ""):CSSStyleDeclarationThrows:
null |
DOMError |
|---|
getSelection ():SelectionThrows:
null |
DOMError |
|---|
matchMedia (query:String):MediaQueryListThrows:
null |
DOMError |
|---|
moveBy (x:Int, y:Int):VoidThrows:
null |
DOMError |
|---|
moveTo (x:Int, y:Int):VoidThrows:
null |
DOMError |
|---|
open (url:String = "", target:String = "", features:String = ""):WindowThrows:
null |
DOMError |
|---|
postMessage (message:Dynamic, targetOrigin:String, ?transfer:Array<Dynamic>):VoidThrows:
null |
DOMError |
|---|
print ():VoidThrows:
null |
DOMError |
|---|
prompt (message:String = "", default_:String = ""):StringThrows:
null |
DOMError |
|---|
releaseEvents ():VoidReleases the window from trapping events of a specific type.
requestAnimationFrame (callback:Float ‑> Void):IntThrows:
null |
DOMError |
|---|
resizeBy (x:Int, y:Int):VoidThrows:
null |
DOMError |
|---|
resizeTo (x:Int, y:Int):VoidThrows:
null |
DOMError |
|---|
scroll (?options:ScrollToOptions):Voidscroll (x:Float, y:Float):VoidscrollBy (?options:ScrollToOptions):VoidscrollBy (x:Float, y:Float):VoidscrollByLines (numLines:Int, ?options:ScrollOptions):VoidScrolls the document by the given number of lines.
scrollByPages (numPages:Int, ?options:ScrollOptions):VoidScrolls the current document by the specified number of pages.
scrollTo (?options:ScrollToOptions):VoidscrollTo (x:Float, y:Float):VoidsetInterval (handler:String, ?timeout:Int, unused:Rest<Dynamic>):IntsetInterval (handler:Function, ?timeout:Int, arguments:Rest<Dynamic>):IntThrows:
null |
DOMError |
|---|
setResizable (resizable:Bool):VoidToggles a user's ability to resize a window.
setTimeout (handler:String, timeout:Int = 0, unused:Rest<Dynamic>):Int setTimeout (handler:Function, timeout:Int = 0, arguments:Rest<Dynamic>):IntThrows:
null |
DOMError |
|---|
sizeToContent ():VoidThrows:
null |
DOMError |
|---|
stop ():VoidThrows:
null |
DOMError |
|---|
updateCommands (action:String, ?sel:Selection, reason:Int = 0):VoidUpdates the state of commands of the current chrome window (UI).
© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/Window.html