Window

@native @JSGlobal @JSType

The window object represents the window itself. The document property of a window points to the DOM document loaded in that window. A window for a given document can be obtained using the document.defaultView property.

In a tabbed browser, such as Firefox, each tab contains its own window object (and if you're writing an extension, the browser window itself is a separate window too - see Working with windows in chrome code for more information). That is, the window object is not shared between tabs in the same window. Some methods, namely window.resizeTo and window.resizeBy apply to the whole window and not to the specific tab the window object belongs to. Generally, anything that can't reasonably pertain to a tab pertains to the window instead.

class Object
trait Any
class Object
trait Matchable
class Any

Value members

Concrete methods

def alert(message: String): Unit
def alert(): Unit

The Window.alert() method displays an alert dialog with the optional specified content and an OK button.

The Window.alert() method displays an alert dialog with the optional specified content and an OK button.

An OfflineResourceList object providing access to the offline resources for the window.

An OfflineResourceList object providing access to the offline resources for the window.

def blur(): Unit

The window.blur() method is the programmatic equivalent of the user shifting focus away from the current window.

The window.blur() method is the programmatic equivalent of the user shifting focus away from the current window.

def cancelAnimationFrame(handle: Int): Unit

Cancels an animation frame request previously scheduled through a call to window.requestAnimationFrame().

Cancels an animation frame request previously scheduled through a call to window.requestAnimationFrame().

def close(): Unit

Closes the current window, or a referenced window.

Closes the current window, or a referenced window.

def closed: Boolean
def confirm(message: String): Boolean

The Window.confirm() method displays a modal dialog with an optional message and two buttons, OK and Cancel.

The Window.confirm() method displays a modal dialog with an optional message and two buttons, OK and Cancel.

Returns a reference to the CustomElementRegistry object, which can be used to register new custom elements and get information about previously registered custom elements.

Returns a reference to the CustomElementRegistry object, which can be used to register new custom elements and get information about previously registered custom elements.

def devicePixelRatio: Double

The Window.devicePixelRatio read-only property returns the ratio of the (vertical) size of one physical pixel on the current display device to the size of one device independent pixel (dips).

The Window.devicePixelRatio read-only property returns the ratio of the (vertical) size of one physical pixel on the current display device to the size of one device independent pixel (dips).

Returns a reference to the document that the window contains.

Returns a reference to the document that the window contains.

def focus(): Unit

Makes a request to bring the window to the front. It may fail due to user settings and the window isn't guaranteed to be frontmost before this method returns.

Makes a request to bring the window to the front. It may fail due to user settings and the window isn't guaranteed to be frontmost before this method returns.

Returns the element (such as <iframe> or <object>) in which the window is embedded, or null if the window is top-level.

Returns the element (such as <iframe> or <object>) in which the window is embedded, or null if the window is top-level.

Returns the window itself, which is an array-like object, listing the direct sub-frames of the current window.

Returns the window itself, which is an array-like object, listing the direct sub-frames of the current window.

def getComputedStyle(elt: Element, pseudoElt: String): CSSStyleDeclaration

Returns a selection object representing the range of text selected by the user.

Returns a selection object representing the range of text selected by the user.

The Window.history read-only property returns a reference to the History object, which provides an interface for manipulating the browser session history (pages visited in the tab or frame that the current page is loaded in).

The Window.history read-only property returns a reference to the History object, which provides an interface for manipulating the browser session history (pages visited in the tab or frame that the current page is loaded in).

def innerHeight: Double

Gets the height of the content area of the browser window including, if rendered, the horizontal scrollbar.

Gets the height of the content area of the browser window including, if rendered, the horizontal scrollbar.

def innerWidth: Double

Gets the width of the content area of the browser window including, if rendered, the vertical scrollbar.

Gets the width of the content area of the browser window including, if rendered, the vertical scrollbar.

def length: Int

Returns the number of frames (either frame or iframe elements) in the window.

Returns the number of frames (either frame or iframe elements) in the window.

def matchMedia(mediaQuery: String): MediaQueryList

Returns a new MediaQueryList object representing the parsed results of the specified media query string.

Returns a new MediaQueryList object representing the parsed results of the specified media query string.

def moveBy(deltaX: Int, deltaY: Int): Unit

Moves the current window by a specified amount.

Moves the current window by a specified amount.

def moveTo(x: Int, y: Int): Unit

Moves the window to the specified coordinates.

Moves the window to the specified coordinates.

def open(url: String, target: String, features: String, replace: Boolean): Window

Loads a resource in a new browsing context or an existing one.

Loads a resource in a new browsing context or an existing one.

def outerHeight: Int

window.outerHeight gets the height in pixels of the whole browser window. It represents the height of the whole browser window including sidebar (if expanded), window chrome and window resizing borders/handles.

window.outerHeight gets the height in pixels of the whole browser window. It represents the height of the whole browser window including sidebar (if expanded), window chrome and window resizing borders/handles.

def outerWidth: Int

window.outerWidth gets the width of the outside of the browser window. It represents the width of the whole browser window including sidebar (if expanded), window chrome and window resizing borders/handles.

window.outerWidth gets the width of the outside of the browser window. It represents the width of the whole browser window including sidebar (if expanded), window chrome and window resizing borders/handles.

def pageXOffset: Double

Returns the number of pixels that the document has already been scrolled horizontally.

Returns the number of pixels that the document has already been scrolled horizontally.

def pageYOffset: Double

Returns the number of pixels that the document has already been scrolled vertically.

Returns the number of pixels that the document has already been scrolled vertically.

Returns a reference to the parent of the current window or subframe.

Returns a reference to the parent of the current window or subframe.

The Web Performance API allows web pages access to certain functions for measuring the performance of web pages and web applications, including the Navigation Timing API and high-resolution time data.

The Web Performance API allows web pages access to certain functions for measuring the performance of web pages and web applications, including the Navigation Timing API and high-resolution time data.

def postMessage(message: Any, targetOrigin: String, transfer: UndefOr[Array[Transferable]]): Unit

Safely enables cross-origin communication between Window objects; e.g., between a page and a pop-up that it spawned, or between a page and an iframe embedded within it.

Safely enables cross-origin communication between Window objects; e.g., between a page and a pop-up that it spawned, or between a page and an iframe embedded within it.

Normally, scripts on different pages are allowed to access each other if and only if the pages they originate from share the same protocol, port number, and host (also known as the "same-origin policy"). window.postMessage() provides a controlled mechanism to securely circumvent this restriction (if used properly).

Broadly, one window may obtain a reference to another (e.g., via targetWindow = window.opener), and then dispatch a MessageEvent on it with targetWindow.postMessage(). The receiving window is then free to handle this event as needed. The arguments passed to window.postMessage() (i.e., the “message”) are exposed to the receiving window through the event object.

Value parameters:
targetOrigin

Specifies what the origin of targetWindow must be for the event to be dispatched, either as the literal string "*" (indicating no preference) or as a URI. If at the time the event is scheduled to be dispatched the scheme, hostname, or port of targetWindow's document does not match that provided in targetOrigin, the event will not be dispatched; only if all three match will the event be dispatched. This mechanism provides control over where messages are sent; for example, if postMessage() was used to transmit a password, it would be absolutely critical that this argument be a URI whose origin is the same as the intended receiver of the message containing the password, to prevent interception of the password by a malicious third party. Always provide a specific targetOrigin, not *, if you know where the other window's document should be located. Failing to provide a specific target discloses the data you send to any interested malicious site.

transfer

A sequence of objects that are transferred with the message. The ownership of these objects is given to the destination side and they are no longer usable on the sending side.

def prompt(message: String, default: String): String
def prompt(): String

The Window.prompt() displays a dialog with an optional message prompting the user to input some text.

The Window.prompt() displays a dialog with an optional message prompting the user to input some text.

def requestAnimationFrame(callback: Function1[Double, _]): Int

The window.requestAnimationFrame() method tells the browser that you wish to perform an animation and requests that the browser call a specified function to update an animation before the next repaint. The method takes as an argument a callback to be invoked before the repaint.

The window.requestAnimationFrame() method tells the browser that you wish to perform an animation and requests that the browser call a specified function to update an animation before the next repaint. The method takes as an argument a callback to be invoked before the repaint.

def resizeBy(deltaX: Int, deltaY: Int): Unit

Resizes the current window by a certain amount.

Resizes the current window by a certain amount.

def resizeTo(width: Int, height: Int): Unit

Dynamically resizes window.

Dynamically resizes window.

Specifies the height of the screen, in pixels, minus permanent or semipermanent user interface features displayed by the operating system, such as the Taskbar on Windows.

Specifies the height of the screen, in pixels, minus permanent or semipermanent user interface features displayed by the operating system, such as the Taskbar on Windows.

def screenY: Int

Returns the vertical distance of the top border of the user's browser from the top edge of the screen.

Returns the vertical distance of the top border of the user's browser from the top edge of the screen.

def scroll(x: Int, y: Int): Unit

Scrolls the window to a particular place in the document.

Scrolls the window to a particular place in the document.

def scrollBy(x: Int, y: Int): Unit

Scrolls the document in the window by the given amount.

Scrolls the document in the window by the given amount.

def scrollTo(x: Int, y: Int): Unit

Scrolls to a particular set of coordinates in the document.

Scrolls to a particular set of coordinates in the document.

def scrollX: Double

The read-only scrollX property of the Window interface returns the number of pixels that the document is currently scrolled horizontally. This value is subpixel precise in modern browsers, meaning that it isn't necessarily a whole number. You can get the number of pixels the document is scrolled vertically from the scrollY property.

The read-only scrollX property of the Window interface returns the number of pixels that the document is currently scrolled horizontally. This value is subpixel precise in modern browsers, meaning that it isn't necessarily a whole number. You can get the number of pixels the document is scrolled vertically from the scrollY property.

def scrollY: Double

The read-only scrollY property of the Window interface returns the number of pixels that the document is currently scrolled vertically. This value is subpixel precise in modern browsers, meaning that it isn't necessarily a whole number. You can get the number of pixels the document is scrolled horizontally from the scrollX property.

The read-only scrollY property of the Window interface returns the number of pixels that the document is currently scrolled vertically. This value is subpixel precise in modern browsers, meaning that it isn't necessarily a whole number. You can get the number of pixels the document is scrolled horizontally from the scrollX property.

Returns an object reference to the window object itself.

Returns an object reference to the window object itself.

def showModalDialog(url: String, argument: Any, options: Any): Dynamic

The Window.showModalDialog() creates and displays a modal dialog box containing a specified HTML document.

The Window.showModalDialog() creates and displays a modal dialog box containing a specified HTML document.

Value parameters:
argument

An optional variant the contains values that should be passed to the dialog box; these are made available in the window object's dialogArguments property.

options

An optional String that specifies window ornamentation

url

The URI of the document to display in the dialog box

def top: Window

Returns a reference to the topmost window in the window hierarchy. This property is read only.

Returns a reference to the topmost window in the window hierarchy. This property is read only.

The window property of a window object points to the window object itself.

The window property of a window object points to the window object itself.

Inherited methods

def addEventListener[T <: Event](`type`: String, listener: Function1[T, _], options: EventListenerOptions): Unit

The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on. The event target may be an Element in a document, the Document itself, a Window, or any other object that supports events (such as XMLHttpRequest).

The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on. The event target may be an Element in a document, the Document itself, a Window, or any other object that supports events (such as XMLHttpRequest).

This implementation accepts a settings object of type EventListenerOptions.

Inherited from:
EventTarget
def addEventListener[T <: Event](`type`: String, listener: Function1[T, _], useCapture: Boolean): Unit

The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on. The event target may be an Element in a document, the Document itself, a Window, or any other object that supports events (such as XMLHttpRequest).

The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on. The event target may be an Element in a document, the Document itself, a Window, or any other object that supports events (such as XMLHttpRequest).

Inherited from:
EventTarget
def atob(encodedString: String): String

Decodes a string of data which has been encoded using base-64 encoding.

Decodes a string of data which has been encoded using base-64 encoding.

Inherited from:
WindowBase64
def btoa(rawString: String): String

Creates a base-64 encoded ASCII string from a "string" of binary data.

Creates a base-64 encoded ASCII string from a "string" of binary data.

Inherited from:
WindowBase64
def caches: UndefOr[CacheStorage]

Returns the CacheStorage object associated with the current context. This object enables functionality such as storing assets for offline use, and generating custom responses to requests.

Returns the CacheStorage object associated with the current context. This object enables functionality such as storing assets for offline use, and generating custom responses to requests.

Inherited from:
WindowOrWorkerGlobalScope
def clearInterval(handle: Int): Unit

Cancels repeated action which was set up using setInterval.

Cancels repeated action which was set up using setInterval.

Inherited from:
WindowTimers
def clearTimeout(handle: Int): Unit

Clears the delay set by window.setTimeout().

Clears the delay set by window.setTimeout().

Inherited from:
WindowTimers
def createImageBitmap(image: CreateImageBitmapInput, sx: Double, sy: Double, sw: Double, sh: Double, options: CreateImageBitmapOptions): Promise[ImageBitmap]
def createImageBitmap(image: CreateImageBitmapInput, sx: Double, sy: Double, sw: Double, sh: Double): Promise[ImageBitmap]

Accepts a variety of different image sources, and returns a Promise which resolves to an ImageBitmap. Optionally the source is cropped to the rectangle of pixels originating at (sx, sy) with width sw, and height sh.

Accepts a variety of different image sources, and returns a Promise which resolves to an ImageBitmap. Optionally the source is cropped to the rectangle of pixels originating at (sx, sy) with width sw, and height sh.

Inherited from:
WindowOrWorkerGlobalScope
def crossOriginIsolated: Boolean

Returns a boolean value that indicates whether a SharedArrayBuffer can be sent via a Window.postMessage() call.

Returns a boolean value that indicates whether a SharedArrayBuffer can be sent via a Window.postMessage() call.

Inherited from:
WindowOrWorkerGlobalScope
def dispatchEvent(evt: Event): Boolean

Dispatches an Event at the specified EventTarget, invoking the affected EventListeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) apply to events dispatched manually with dispatchEvent().

Dispatches an Event at the specified EventTarget, invoking the affected EventListeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) apply to events dispatched manually with dispatchEvent().

Inherited from:
EventTarget
def fetch(info: RequestInfo, init: RequestInit): Promise[Response]

Starts the process of fetching a resource from the network.

Starts the process of fetching a resource from the network.

Inherited from:
WindowOrWorkerGlobalScope
def hasOwnProperty(v: String): Boolean
Inherited from:
Object
def indexedDB: UndefOr[IDBFactory]

Provides a mechanism for applications to asynchronously access capabilities of indexed databases.

Provides a mechanism for applications to asynchronously access capabilities of indexed databases.

Inherited from:
WindowOrWorkerGlobalScope
def isPrototypeOf(v: Object): Boolean
Inherited from:
Object
def isSecureContext: Boolean

Returns a boolean indicating whether the current context is secure or not.

Returns a boolean indicating whether the current context is secure or not.

Inherited from:
WindowOrWorkerGlobalScope
def origin: String

Returns the origin of the global scope, serialized as a string.

Returns the origin of the global scope, serialized as a string.

Inherited from:
WindowOrWorkerGlobalScope
def propertyIsEnumerable(v: String): Boolean
Inherited from:
Object
def queueMicrotask(function: Function0[Any]): Unit

Enqueues a microtask—a short function to be executed after execution of the JavaScript code completes and control isn't being returned to a JavaScript caller, but before handling callbacks and other tasks.

Enqueues a microtask—a short function to be executed after execution of the JavaScript code completes and control isn't being returned to a JavaScript caller, but before handling callbacks and other tasks.

This lets your code run without interfering with other, possibly higher priority, code, but before the browser runtime regains control, potentially depending upon the work you need to complete.

Inherited from:
WindowOrWorkerGlobalScope
def removeEventListener[T <: Event](`type`: String, listener: Function1[T, _], options: EventListenerOptions): Unit

Removes the event listener previously registered with EventTarget.addEventListener.

Removes the event listener previously registered with EventTarget.addEventListener.

This implementation accepts a settings object of type EventListenerOptions.

Inherited from:
EventTarget
def removeEventListener[T <: Event](`type`: String, listener: Function1[T, _], useCapture: Boolean): Unit

Removes the event listener previously registered with EventTarget.addEventListener.

Removes the event listener previously registered with EventTarget.addEventListener.

Inherited from:
EventTarget

This is a global object (sessionStorage) that maintains a storage area that's available for the duration of the page session. A page session lasts for as long as the browser is open and survives over page reloads and restores. Opening a page in a new tab or window will cause a new session to be initiated.

This is a global object (sessionStorage) that maintains a storage area that's available for the duration of the page session. A page session lasts for as long as the browser is open and survives over page reloads and restores. Opening a page in a new tab or window will cause a new session to be initiated.

Inherited from:
WindowSessionStorage
def setInterval(handler: Function0[Any], timeout: Double): Int

Calls a function or executes a code snippet repeatedly, with a fixed time delay between each call to that function.

Calls a function or executes a code snippet repeatedly, with a fixed time delay between each call to that function.

Inherited from:
WindowTimers
def setTimeout(handler: Function0[Any], timeout: Double): Int

Calls a function or executes a code snippet after a specified delay.

Calls a function or executes a code snippet after a specified delay.

Inherited from:
WindowTimers
def toLocaleString(): String
Inherited from:
Object
def valueOf(): Any
Inherited from:
Object

Concrete fields

var gotpointercapture: Function1[PointerEvent, _]

fired when an element receives pointer capture.

fired when an element receives pointer capture.

The Window.location property returns a Location object with information about the current location of the document.

The Window.location property returns a Location object with information about the current location of the document.

var lostpointercapture: Function1[PointerEvent, _]

Fired after pointer capture is released for a pointer.

Fired after pointer capture is released for a pointer.

var name: String

The name of the window is used primarily for setting targets for hyperlinks and forms. Windows do not need to have names.

The name of the window is used primarily for setting targets for hyperlinks and forms. Windows do not need to have names.

var onabort: Function1[UIEvent, _]

An event handler property for abort events on the window.

An event handler property for abort events on the window.

var onafterprint: Function1[Event, _]

The onafterprint property sets and returns the onafterprint event handler code for the current window.

The onafterprint property sets and returns the onafterprint event handler code for the current window.

var onbeforeprint: Function1[Event, _]

The onbeforeprint property sets and returns the onbeforeprint event handler code for the current window.

The onbeforeprint property sets and returns the onbeforeprint event handler code for the current window.

An event that fires when a window is about to unload its resources. The document is still visible and the event is still cancelable.

An event that fires when a window is about to unload its resources. The document is still visible and the event is still cancelable.

var onblur: Function1[FocusEvent, _]

The onblur property can be used to set the blur handler on the window, which is triggered when the window loses focus.

The onblur property can be used to set the blur handler on the window, which is triggered when the window loses focus.

var oncanplay: Function1[Event, _]
var oncanplaythrough: Function1[Event, _]
var onchange: Function1[Event, _]

An event handler property for change events on the window.

An event handler property for change events on the window.

var onclick: Function1[MouseEvent, _]

Called when the user clicks the mouse button while the cursor is in the window. This event is fired for any mouse button pressed; you can look at the event properties to find out which button was pressed and where.

Called when the user clicks the mouse button while the cursor is in the window. This event is fired for any mouse button pressed; you can look at the event properties to find out which button was pressed and where.

var oncontextmenu: Function1[MouseEvent, _]

An event handler property for right-click events on the window.

An event handler property for right-click events on the window.

var ondblclick: Function1[MouseEvent, _]
var ondrag: Function1[DragEvent, _]
var ondragend: Function1[DragEvent, _]
var ondragenter: Function1[DragEvent, _]

Called for an element when the mouse pointer first moves over the element while something is being dragged. This might be used to change the appearance of the element to indicate to the user that the object can be dropped on it.

Called for an element when the mouse pointer first moves over the element while something is being dragged. This might be used to change the appearance of the element to indicate to the user that the object can be dropped on it.

var ondragleave: Function1[DragEvent, _]
var ondragover: Function1[DragEvent, _]
var ondragstart: Function1[DragEvent, _]
var ondrop: Function1[DragEvent, _]
var ondurationchange: Function1[Event, _]
var onemptied: Function1[Event, _]
var onended: Function1[Event, _]
var onerror: Function5[Event, String, Int, Int, Any, _]

An event handler property for errors raised on the window.

An event handler property for errors raised on the window.

var onfocus: Function1[FocusEvent, _]

An event handler property for focus events on the window.

An event handler property for focus events on the window.

var onhashchange: Function1[HashChangeEvent, _]

An event handler property for hash change events on the window; called when the part of the URL after the hash mark ("#") changes.

An event handler property for hash change events on the window; called when the part of the URL after the hash mark ("#") changes.

var oninput: Function1[Event, _]
var onkeydown: Function1[KeyboardEvent, _]

An event handler property for keydown events on the window.

An event handler property for keydown events on the window.

var onkeypress: Function1[KeyboardEvent, _]

An event handler property for keypress events on the window.

An event handler property for keypress events on the window.

var onkeyup: Function1[KeyboardEvent, _]

An event handler property for keyup events on the window.

An event handler property for keyup events on the window.

var onload: Function1[Event, _]

An event handler property for window loading.

An event handler property for window loading.

var onloadeddata: Function1[Event, _]
var onloadedmetadata: Function1[Event, _]
var onloadstart: Function1[Event, _]
var onmessage: Function1[MessageEvent, _]
var onmousedown: Function1[MouseEvent, _]

An event handler property for mousedown events on the window.

An event handler property for mousedown events on the window.

var onmousemove: Function1[MouseEvent, _]

An event handler property for mousemove events on the window.

An event handler property for mousemove events on the window.

var onmouseout: Function1[MouseEvent, _]

An event handler property for mouseout events on the window.

An event handler property for mouseout events on the window.

var onmouseover: Function1[MouseEvent, _]

An event handler property for mouseover events on the window.

An event handler property for mouseover events on the window.

var onmouseup: Function1[MouseEvent, _]

An event handler property for mouseup events on the window.

An event handler property for mouseup events on the window.

var onmousewheel: Function1[WheelEvent, _]
var onoffline: Function1[Event, _]
var ononline: Function1[Event, _]
var onpagehide: Function1[PageTransitionEvent, _]

An event handler property for pagehide events, which are fired when the browser hides the current page in the process of presenting a different page from the session's history.

An event handler property for pagehide events, which are fired when the browser hides the current page in the process of presenting a different page from the session's history.

For example, when the user clicks the browser's Back button, the current page receives a pagehide event before the previous page is shown.

var onpageshow: Function1[PageTransitionEvent, _]

An event handler property for pageshow events, which are fired when the browser makes the window's document visible due to navigation tasks. This includes the process of initially loading the page, navigating to the page from another page within the same window or tab, or returning to the page using the browser's forward or back buttons.

An event handler property for pageshow events, which are fired when the browser makes the window's document visible due to navigation tasks. This includes the process of initially loading the page, navigating to the page from another page within the same window or tab, or returning to the page using the browser's forward or back buttons.

When this event is sent during the page load process, it's sent after the load event.

var onpause: Function1[Event, _]
var onplay: Function1[Event, _]
var onplaying: Function1[Event, _]
var onpointercancel: Function1[PointerEvent, _]

a browser fires this event if it concludes the pointer will no longer be able to generate events (for example the related device is deactived).

a browser fires this event if it concludes the pointer will no longer be able to generate events (for example the related device is deactived).

var onpointerdown: Function1[PointerEvent, _]

fired when a pointer becomes active.

fired when a pointer becomes active.

var onpointerenter: Function1[PointerEvent, _]

fired when a pointing device is moved into the hit test boundaries of an element or one of its descendants, including as a result of a pointerdown event from a device that does not support hover (see pointerdown).

fired when a pointing device is moved into the hit test boundaries of an element or one of its descendants, including as a result of a pointerdown event from a device that does not support hover (see pointerdown).

var onpointerleave: Function1[PointerEvent, _]

fired when a pointing device is moved out of the hit test boundaries of an element. For pen devices, this event is fired when the stylus leaves the hover range detectable by the digitizer.

fired when a pointing device is moved out of the hit test boundaries of an element. For pen devices, this event is fired when the stylus leaves the hover range detectable by the digitizer.

var onpointermove: Function1[PointerEvent, _]

fired when a pointer changes coordinates.

fired when a pointer changes coordinates.

var onpointerout: Function1[PointerEvent, _]

fired for several reasons including: pointing device is moved out of the hit test boundaries of an element; firing the pointerup event for a device that does not support hover (see pointerup); after firing the pointercancel event (see pointercancel); when a pen stylus leaves the hover range detectable by the digitizer.

fired for several reasons including: pointing device is moved out of the hit test boundaries of an element; firing the pointerup event for a device that does not support hover (see pointerup); after firing the pointercancel event (see pointercancel); when a pen stylus leaves the hover range detectable by the digitizer.

var onpointerover: Function1[PointerEvent, _]

fired when a pointing device is moved into an element's hit test boundaries.

fired when a pointing device is moved into an element's hit test boundaries.

var onpointerup: Function1[PointerEvent, _]

fired when a pointer is no longer active.

fired when a pointer is no longer active.

var onpopstate: Function1[PopStateEvent, _]

An event handler property for popstate events, which are fired when navigating to a session history entry representing a state object.

An event handler property for popstate events, which are fired when navigating to a session history entry representing a state object.

var onprogress: Function1[Any, _]
var onratechange: Function1[Event, _]
var onreadystatechange: Function1[Event, _]
var onreset: Function1[Event, _]

An event handler property for reset events on the window.

An event handler property for reset events on the window.

var onresize: Function1[UIEvent, _]

An event handler for the resize event on the window.

An event handler for the resize event on the window.

var onscroll: Function1[UIEvent, _]

Specifies the function to be called when the window is scrolled.

Specifies the function to be called when the window is scrolled.

var onseeked: Function1[Event, _]
var onseeking: Function1[Event, _]
var onselect: Function1[UIEvent, _]

An event handler property for window selection.

An event handler property for window selection.

var onstalled: Function1[Event, _]
var onstorage: Function1[StorageEvent, _]
var onsubmit: Function1[Event, _]

An event handler property for submits on window forms.

An event handler property for submits on window forms.

var onsuspend: Function1[Event, _]
var ontimeupdate: Function1[Event, _]
var onunload: Function1[Event, _]

The unload event is raised when the window is unloading its content and resources. The resources removal is processed  after the unload event occurs.

The unload event is raised when the window is unloading its content and resources. The resources removal is processed  after the unload event occurs.

var onvolumechange: Function1[Event, _]
var onwaiting: Function1[Event, _]
var onwheel: Function1[WheelEvent, _]

Returns a reference to the window that opened this current window.

Returns a reference to the window that opened this current window.

var screenX: Int

Returns the horizontal distance of the left border of the user's browser from the left side of the screen.

Returns the horizontal distance of the left border of the user's browser from the left side of the screen.

Inherited fields

Inherited from:
WindowConsole