Window

A window containing a DOM document; the document property points to the DOM document loaded in that window.

MDN Reference

Properties

Link copied to clipboard

Returns true if the window has been closed, false otherwise.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Returns true if the location bar is visible; otherwise, returns false.

Link copied to clipboard

Returns true if the menu bar is visible; otherwise, returns false.

Link copied to clipboard
Link copied to clipboard

Fires when the user aborts the download.

Link copied to clipboard

Fires when the object loses the input focus.

Link copied to clipboard

Occurs when playback is possible, but would require further buffering.

Link copied to clipboard

Fires when the contents of the object or selection have changed.

Link copied to clipboard

Fires when the user clicks the left mouse button on the object

Link copied to clipboard

Fires when the user clicks the right mouse button in the client area, opening the context menu.

Link copied to clipboard

Fires when the user double-clicks the object.

Link copied to clipboard

Available only in secure contexts.

Link copied to clipboard

Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard

Fires on the source object continuously during a drag operation.

Link copied to clipboard

Fires on the source object when the user releases the mouse at the close of a drag operation.

Link copied to clipboard

Fires on the target element when the user drags the object to a valid drop target.

Link copied to clipboard

Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.

Link copied to clipboard

Fires on the target element continuously while the user drags the object over a valid drop target.

Link copied to clipboard

Fires on the source object when the user starts to drag a text selection or selected object.

Link copied to clipboard
Link copied to clipboard

Occurs when the duration attribute is updated.

Link copied to clipboard

Occurs when the media element is reset to its initial state.

Link copied to clipboard

Occurs when the end of playback is reached.

Link copied to clipboard
open var onerror: Function<Unit>?

Fires when an error occurs during object loading.

Link copied to clipboard

Fires when the object receives focus.

Link copied to clipboard
Link copied to clipboard

Fires when the user presses a key.

Link copied to clipboard

Fires when the user releases a key.

Link copied to clipboard

Fires immediately after the browser loads the object.

Link copied to clipboard

Occurs when media data is loaded at the current playback position.

Link copied to clipboard

Occurs when the duration and dimensions of the media have been determined.

Link copied to clipboard

Occurs when Internet Explorer begins looking for media data.

Link copied to clipboard

Fires when the user clicks the object with either mouse button.

Link copied to clipboard

Fires when the user moves the mouse over the object.

Link copied to clipboard

Fires when the user moves the mouse pointer outside the boundaries of the object.

Link copied to clipboard

Fires when the user moves the mouse pointer into the object.

Link copied to clipboard

Fires when the user releases a mouse button while the mouse is over the object.

Link copied to clipboard

Occurs when playback is paused.

Link copied to clipboard

Occurs when the play method is requested.

Link copied to clipboard

Occurs when the audio or video has started playing.

Link copied to clipboard

Occurs to indicate progress while downloading media data.

Link copied to clipboard

Occurs when the playback rate is increased or decreased.

Link copied to clipboard

Fires when the user resets a form.

Link copied to clipboard

Fires when the user repositions the scroll box in the scroll bar on the object.

Link copied to clipboard

Occurs when the seek operation ends.

Link copied to clipboard

Occurs when the current playback position is moved.

Link copied to clipboard

Fires when the current selection changes.

Link copied to clipboard

Occurs when the download has stopped.

Link copied to clipboard

Occurs if the load operation has been intentionally halted.

Link copied to clipboard

Occurs to indicate the current playback position.

Link copied to clipboard

Occurs when the volume is changed, or playback is muted or unmuted.

Link copied to clipboard

Occurs when playback stops because the next frame of a video resource is not available.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Refers to either the parent WindowProxy, or itself.

Link copied to clipboard

Returns true if the personal bar is visible; otherwise, returns false.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Returns true if the scrollbars are visible; otherwise, returns false.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Returns true if the status bar is visible; otherwise, returns false.

Link copied to clipboard

Returns true if the toolbar is visible; otherwise, returns false.

Link copied to clipboard

Functions

Link copied to clipboard
fun close()

Closes the window.

Link copied to clipboard
Link copied to clipboard
fun focus()

Moves the focus to the window's browsing context, if any.

Link copied to clipboard
open operator fun get(key: String): Any?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun open(url: String = definedExternally, target: WindowTarget = definedExternally, features: String = definedExternally): WindowProxy?
fun open(url: URL, target: WindowTarget = definedExternally, features: String = definedExternally): WindowProxy?
Link copied to clipboard
fun postMessage(message: Any?, options: WindowPostMessageOptions = definedExternally)

fun postMessage(message: Any?, targetOrigin: String, transfer: ReadonlyArray<Transferable> = definedExternally)

Posts a message to the given window. Messages can be structured objects, e.g. nested objects and arrays, can contain JavaScript values (strings, numbers, Date objects, etc), and can contain certain data objects such as File Blob, FileList, and ArrayBuffer objects.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun resizeTo(width: Int, height: Int)
Link copied to clipboard
fun scroll(options: ScrollToOptions = definedExternally)
fun scroll(x: Double, y: Double)
Link copied to clipboard
fun scrollBy(options: ScrollToOptions = definedExternally)
fun scrollBy(x: Double, y: Double)
Link copied to clipboard
fun scrollTo(options: ScrollToOptions = definedExternally)
fun scrollTo(x: Double, y: Double)
Link copied to clipboard
open operator fun set(key: String, value: Any?)
Link copied to clipboard
fun stop()

Cancels the document load.