The window
object represents a window containing a DOM document; the document
property points to the DOM document loaded in that window.
Documentation Window by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See:
Variables
Returns a reference to the content element in the current window. The obsolete variant with underscore is no longer available from Web content.
read onlydevicePixelRatio:Float
Returns the ratio between physical pixels and device independent pixels in the current display.
read onlyframeElement:Element
Returns the element in which the window is embedded, or null if the window is not embedded.
Gets the height of the content area of the browser window including, if rendered, the horizontal scrollbar.
Gets the width of the content area of the browser window including, if rendered, the vertical scrollbar.
read onlylocalStorage:Storage
Returns a reference to the local storage object used to store data that may only be accessed by the origin that created it.
read onlylocationbar:BarProp
Returns the locationbar object, whose visibility can be toggled in the window.
read onlyorientation:Int
Returns the orientation in degrees (in 90 degree increments) of the viewport relative to the device's natural orientation.
read onlypersonalbar:BarProp
Returns the personalbar object, whose visibility can be toggled in the window.
Returns the horizontal distance of the left border of the user's browser from the left side of the screen.
Returns the vertical distance of the top border of the user's browser from the top side of the screen.
read onlyscrollMaxX:Int
The maximum offset that the window can be scrolled to horizontally, that is the document width minus the viewport width.
read onlyscrollMaxY:Int
The maximum offset that the window can be scrolled to vertically (i.e., the document height minus the viewport height).
read onlyscrollbars:BarProp
Returns the scrollbars object, whose visibility can be toggled in the window.
read onlysessionStorage:Storage
Returns a storage object for storing data within a single page session.
read onlyspeechSynthesis:SpeechSynthesis
Returns a SpeechSynthesis
object, which is the entry point into using Web Speech API speech synthesis functionality.
Methods
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 |
---|
find (str:String = "", caseSensitive:Bool = false, backwards:Bool = false, wrapAround:Bool = false, wholeWord:Bool = false, searchInFrames:Bool = false, showDialog:Bool = false):Bool
Throws:
null | DOMError |
---|
postMessage (message:Dynamic, targetOrigin:String, ?transfer:Array<Dynamic>):Void
Throws:
null | DOMError |
---|
scrollByLines (numLines:Int, ?options:ScrollOptions):Void
Scrolls the document by the given number of lines.
scrollByPages (numPages:Int, ?options:ScrollOptions):Void
Scrolls the current document by the specified number of pages.
setInterval (handler:String, ?timeout:Int, unused:Rest<Dynamic>):Int
setInterval (handler:Function, ?timeout:Int, arguments:Rest<Dynamic>):Int
Throws:
null | DOMError |
---|
setTimeout (handler:String, timeout:Int = 0, unused:Rest<Dynamic>):Int
setTimeout (handler:Function, timeout:Int = 0, arguments:Rest<Dynamic>):Int
Throws:
null | DOMError |
---|
updateCommands (action:String, ?sel:Selection, reason:Int = 0):Void
Updates the state of commands of the current chrome window (UI).