Class

org.scalajs.dom

Window

Related Doc: package dom

Permalink

class Window extends EventTarget with WindowLocalStorage with WindowSessionStorage with WindowOrWorkerGlobalScope with WindowConsole

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.

Annotations
@JSType() @native() @JSGlobal()
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Window
  2. WindowConsole
  3. WindowOrWorkerGlobalScope
  4. WindowTimers
  5. WindowBase64
  6. WindowSessionStorage
  7. WindowLocalStorage
  8. EventTarget
  9. Object
  10. Any
  11. AnyRef
  12. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Window()

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addEventListener[T <: Event](type: String, listener: Function1[T, _], options: EventListenerOptions): Unit

    Permalink

    The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on.

    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.

    Definition Classes
    EventTarget
  5. def addEventListener[T <: Event](type: String, listener: Function1[T, _], useCapture: Boolean = js.native): Unit

    Permalink

    The EventTarget.addEventListener() method registers the specified listener on the EventTarget it's called on.

    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).

    Definition Classes
    EventTarget
  6. def alert(): Unit

    Permalink

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

  7. def alert(message: String): Unit

    Permalink
  8. def applicationCache: ApplicationCache

    Permalink

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

  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def atob(encodedString: String): String

    Permalink

    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.

    Definition Classes
    WindowBase64
  11. def blur(): Unit

    Permalink

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

  12. def btoa(rawString: String): String

    Permalink

    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.

    Definition Classes
    WindowBase64
  13. def caches: UndefOr[CacheStorage]

    Permalink

    Returns the CacheStorage object associated with the current context.

    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.

    Definition Classes
    WindowOrWorkerGlobalScope
  14. def cancelAnimationFrame(handle: Int): Unit

    Permalink

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

  15. def clearInterval(handle: Int): Unit

    Permalink

    Cancels repeated action which was set up using setInterval.

    Cancels repeated action which was set up using setInterval.

    Definition Classes
    WindowTimers
  16. def clearTimeout(handle: Int): Unit

    Permalink

    Clears the delay set by window.setTimeout().

    Clears the delay set by window.setTimeout().

    Definition Classes
    WindowTimers
  17. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. def close(): Unit

    Permalink

    Closes the current window, or a referenced window.

  19. def closed: Boolean

    Permalink
  20. def confirm(message: String = js.native): Boolean

    Permalink

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

  21. var console: Console

    Permalink
    Definition Classes
    WindowConsole
  22. def createImageBitmap(image: CreateImageBitmapInput, sx: Double, sy: Double, sw: Double, sh: Double, options: CreateImageBitmapOptions): Promise[ImageBitmap]

    Permalink
    Definition Classes
    WindowOrWorkerGlobalScope
  23. def createImageBitmap(image: CreateImageBitmapInput, sx: Double, sy: Double, sw: Double, sh: Double): Promise[ImageBitmap]

    Permalink
    Definition Classes
    WindowOrWorkerGlobalScope
  24. def createImageBitmap(image: CreateImageBitmapInput, options: CreateImageBitmapOptions): Promise[ImageBitmap]

    Permalink
    Definition Classes
    WindowOrWorkerGlobalScope
  25. def createImageBitmap(image: CreateImageBitmapInput): Promise[ImageBitmap]

    Permalink

    Accepts a variety of different image sources, and returns a Promise which resolves to an 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.

    Definition Classes
    WindowOrWorkerGlobalScope
  26. def crossOriginIsolated: Boolean

    Permalink

    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.

    Definition Classes
    WindowOrWorkerGlobalScope
  27. def customElements: CustomElementRegistry

    Permalink

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

  28. def devicePixelRatio: Double

    Permalink

    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).

  29. def dispatchEvent(evt: Event): Boolean

    Permalink

    Dispatches an Event at the specified EventTarget, invoking the affected EventListeners in the appropriate order.

    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().

    Definition Classes
    EventTarget
  30. def document: HTMLDocument

    Permalink

    Returns a reference to the document that the window contains.

  31. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  32. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  33. def fetch(info: RequestInfo, init: RequestInit = js.native): Promise[Response]

    Permalink

    Starts the process of fetching a resource from the network.

    Starts the process of fetching a resource from the network.

    Definition Classes
    WindowOrWorkerGlobalScope
  34. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  35. def focus(): Unit

    Permalink

    Makes a request to bring the window to the front.

    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.

  36. def frameElement: Element

    Permalink

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

  37. def frames: Window

    Permalink

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

  38. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  39. def getComputedStyle(elt: Element, pseudoElt: String = js.native): CSSStyleDeclaration

    Permalink
  40. def getSelection(): Selection

    Permalink

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

  41. var gotpointercapture: Function1[PointerEvent, _]

    Permalink

    fired when an element receives pointer capture.

  42. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  43. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  44. def history: History

    Permalink

    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).

  45. def indexedDB: UndefOr[IDBFactory]

    Permalink

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

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

    Definition Classes
    WindowOrWorkerGlobalScope
  46. def innerHeight: Double

    Permalink

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

  47. def innerWidth: Double

    Permalink

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

  48. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  49. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  50. def isSecureContext: Boolean

    Permalink

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

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

    Definition Classes
    WindowOrWorkerGlobalScope
  51. def length: Int

    Permalink

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

  52. def localStorage: Storage

    Permalink
    Definition Classes
    WindowLocalStorage
  53. var location: Location

    Permalink

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

  54. var lostpointercapture: Function1[PointerEvent, _]

    Permalink

    Fired after pointer capture is released for a pointer.

  55. def matchMedia(mediaQuery: String): MediaQueryList

    Permalink

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

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

    Permalink

    Moves the current window by a specified amount.

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

    Permalink

    Moves the window to the specified coordinates.

  58. var name: String

    Permalink

    The name of the window is used primarily for setting targets for hyperlinks and forms.

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

  59. def navigator: Navigator

    Permalink

    The Window.navigator read-only property returns a reference to the Navigator object, which can be queried for information about the application running the script.

  60. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  61. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  62. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  63. var onabort: Function1[UIEvent, _]

    Permalink

    An event handler property for abort events on the window.

  64. var onafterprint: Function1[Event, _]

    Permalink

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

  65. var onbeforeprint: Function1[Event, _]

    Permalink

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

  66. var onbeforeunload: Function1[BeforeUnloadEvent, _]

    Permalink

    An event that fires when a window is about to unload its resources.

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

  67. var onblur: Function1[FocusEvent, _]

    Permalink

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

  68. var oncanplay: Function1[Event, _]

    Permalink
  69. var oncanplaythrough: Function1[Event, _]

    Permalink
  70. var onchange: Function1[Event, _]

    Permalink

    An event handler property for change events on the window.

  71. var onclick: Function1[MouseEvent, _]

    Permalink

    Called when the user clicks the mouse button while the cursor is in the window.

    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.

  72. var oncontextmenu: Function1[MouseEvent, _]

    Permalink

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

  73. var ondblclick: Function1[MouseEvent, _]

    Permalink
  74. var ondrag: Function1[DragEvent, _]

    Permalink
  75. var ondragend: Function1[DragEvent, _]

    Permalink
  76. var ondragenter: Function1[DragEvent, _]

    Permalink

    Called for an element when the mouse pointer first moves over the element while something is being dragged.

    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.

  77. var ondragleave: Function1[DragEvent, _]

    Permalink
  78. var ondragover: Function1[DragEvent, _]

    Permalink
  79. var ondragstart: Function1[DragEvent, _]

    Permalink
  80. var ondrop: Function1[DragEvent, _]

    Permalink
  81. var ondurationchange: Function1[Event, _]

    Permalink
  82. var onemptied: Function1[Event, _]

    Permalink
  83. var onended: Function1[Event, _]

    Permalink
  84. var onerror: Function5[Event, String, Int, Int, Any, _]

    Permalink

    An event handler property for errors raised on the window.

  85. var onfocus: Function1[FocusEvent, _]

    Permalink

    An event handler property for focus events on the window.

  86. var onhashchange: Function1[HashChangeEvent, _]

    Permalink

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

  87. var oninput: Function1[Event, _]

    Permalink
  88. var onkeydown: Function1[KeyboardEvent, _]

    Permalink

    An event handler property for keydown events on the window.

  89. var onkeypress: Function1[KeyboardEvent, _]

    Permalink

    An event handler property for keypress events on the window.

  90. var onkeyup: Function1[KeyboardEvent, _]

    Permalink

    An event handler property for keyup events on the window.

  91. var onload: Function1[Event, _]

    Permalink

    An event handler property for window loading.

  92. var onloadeddata: Function1[Event, _]

    Permalink
  93. var onloadedmetadata: Function1[Event, _]

    Permalink
  94. var onloadstart: Function1[Event, _]

    Permalink
  95. var onmessage: Function1[MessageEvent, _]

    Permalink
  96. var onmousedown: Function1[MouseEvent, _]

    Permalink

    An event handler property for mousedown events on the window.

  97. var onmousemove: Function1[MouseEvent, _]

    Permalink

    An event handler property for mousemove events on the window.

  98. var onmouseout: Function1[MouseEvent, _]

    Permalink

    An event handler property for mouseout events on the window.

  99. var onmouseover: Function1[MouseEvent, _]

    Permalink

    An event handler property for mouseover events on the window.

  100. var onmouseup: Function1[MouseEvent, _]

    Permalink

    An event handler property for mouseup events on the window.

  101. var onmousewheel: Function1[WheelEvent, _]

    Permalink
  102. var onoffline: Function1[Event, _]

    Permalink
  103. var ononline: Function1[Event, _]

    Permalink
  104. var onpagehide: Function1[PageTransitionEvent, _]

    Permalink

    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.

  105. var onpageshow: Function1[PageTransitionEvent, _]

    Permalink

    An event handler property for pageshow events, which are fired when the browser makes the window's document visible due to navigation tasks.

    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.

  106. var onpause: Function1[Event, _]

    Permalink
  107. var onplay: Function1[Event, _]

    Permalink
  108. var onplaying: Function1[Event, _]

    Permalink
  109. var onpointercancel: Function1[PointerEvent, _]

    Permalink

    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).

  110. var onpointerdown: Function1[PointerEvent, _]

    Permalink

    fired when a pointer becomes active.

  111. var onpointerenter: Function1[PointerEvent, _]

    Permalink

    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).

  112. var onpointerleave: Function1[PointerEvent, _]

    Permalink

    fired when a pointing device is moved out of the hit test boundaries of an element.

    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.

  113. var onpointermove: Function1[PointerEvent, _]

    Permalink

    fired when a pointer changes coordinates.

  114. var onpointerout: Function1[PointerEvent, _]

    Permalink

    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.

  115. var onpointerover: Function1[PointerEvent, _]

    Permalink

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

  116. var onpointerup: Function1[PointerEvent, _]

    Permalink

    fired when a pointer is no longer active.

  117. var onpopstate: Function1[PopStateEvent, _]

    Permalink

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

  118. var onprogress: Function1[Any, _]

    Permalink
  119. var onratechange: Function1[Event, _]

    Permalink
  120. var onreadystatechange: Function1[Event, _]

    Permalink
  121. var onreset: Function1[Event, _]

    Permalink

    An event handler property for reset events on the window.

  122. var onresize: Function1[UIEvent, _]

    Permalink

    An event handler for the resize event on the window.

  123. var onscroll: Function1[UIEvent, _]

    Permalink

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

  124. var onseeked: Function1[Event, _]

    Permalink
  125. var onseeking: Function1[Event, _]

    Permalink
  126. var onselect: Function1[UIEvent, _]

    Permalink

    An event handler property for window selection.

  127. var onstalled: Function1[Event, _]

    Permalink
  128. var onstorage: Function1[StorageEvent, _]

    Permalink
  129. var onsubmit: Function1[Event, _]

    Permalink

    An event handler property for submits on window forms.

  130. var onsuspend: Function1[Event, _]

    Permalink
  131. var ontimeupdate: Function1[Event, _]

    Permalink
  132. var onunload: Function1[Event, _]

    Permalink

    The unload event is raised when the window is unloading its content and resources.

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

  133. var onvolumechange: Function1[Event, _]

    Permalink
  134. var onwaiting: Function1[Event, _]

    Permalink
  135. var onwheel: Function1[WheelEvent, _]

    Permalink
  136. def open(url: String = js.native, target: String = js.native, features: String = js.native, replace: Boolean = js.native): Window

    Permalink

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

  137. var opener: Window

    Permalink

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

  138. def origin: String

    Permalink

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

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

    Definition Classes
    WindowOrWorkerGlobalScope
  139. def outerHeight: Int

    Permalink

    window.outerHeight gets the height in pixels of the whole browser window.

    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.

  140. def outerWidth: Int

    Permalink

    window.outerWidth gets the width of the outside of the browser window.

    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.

  141. def pageXOffset: Double

    Permalink

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

  142. def pageYOffset: Double

    Permalink

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

  143. def parent: Window

    Permalink

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

  144. def performance: Performance

    Permalink

    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.

  145. def postMessage(message: Any, targetOrigin: String, transfer: UndefOr[Array[Transferable]] = js.native): Unit

    Permalink

    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.

    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.

  146. def print(): Unit

    Permalink

    Opens the Print Dialog to print the current document.

  147. def prompt(): String

    Permalink

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

  148. def prompt(message: String, default: String = js.native): String

    Permalink
  149. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  150. def queueMicrotask(function: Function0[Any]): Unit

    Permalink

    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.

    Definition Classes
    WindowOrWorkerGlobalScope
  151. def removeEventListener[T <: Event](type: String, listener: Function1[T, _], options: EventListenerOptions): Unit

    Permalink

    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.

    Definition Classes
    EventTarget
  152. def removeEventListener[T <: Event](type: String, listener: Function1[T, _], useCapture: Boolean = js.native): Unit

    Permalink

    Removes the event listener previously registered with EventTarget.addEventListener.

    Removes the event listener previously registered with EventTarget.addEventListener.

    Definition Classes
    EventTarget
  153. def requestAnimationFrame(callback: Function1[Double, _]): Int

    Permalink

    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 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.

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

    Permalink

    Resizes the current window by a certain amount.

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

    Permalink

    Dynamically resizes window.

  156. def screen: Screen

    Permalink

    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.

  157. var screenX: Int

    Permalink

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

  158. def screenY: Int

    Permalink

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

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

    Permalink

    Scrolls the window to a particular place in the document.

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

    Permalink

    Scrolls the document in the window by the given amount.

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

    Permalink

    Scrolls to a particular set of coordinates in the document.

  162. def scrollX: Double

    Permalink

    The read-only scrollX property of the Window interface returns the number of pixels that the document is currently scrolled horizontally.

    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.

  163. def scrollY: Double

    Permalink

    The read-only scrollY property of the Window interface returns the number of pixels that the document is currently scrolled vertically.

    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.

  164. def self: Window

    Permalink

    Returns an object reference to the window object itself.

  165. def sessionStorage: Storage

    Permalink

    This is a global object (sessionStorage) that maintains a storage area that's available for the duration of the page session.

    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.

    Definition Classes
    WindowSessionStorage
  166. def setInterval(handler: Function0[Any], timeout: Double): Int

    Permalink

    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.

    Definition Classes
    WindowTimers
  167. def setTimeout(handler: Function0[Any], timeout: Double): Int

    Permalink

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

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

    Definition Classes
    WindowTimers
  168. def showModalDialog(url: String = js.native, argument: Any = js.native, options: Any = js.native): Dynamic

    Permalink

    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.

    url

    The URI of the document to display in the dialog box

    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

  169. def styleMedia: StyleMedia

    Permalink
  170. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  171. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  172. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  173. def top: Window

    Permalink

    Returns a reference to the topmost window in the window hierarchy.

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

  174. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  175. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  176. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  177. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  178. def window: Window

    Permalink

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

Inherited from WindowConsole

Inherited from WindowOrWorkerGlobalScope

Inherited from WindowTimers

Inherited from WindowBase64

Inherited from WindowSessionStorage

Inherited from WindowLocalStorage

Inherited from EventTarget

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped