Try Install Learn Blog API Packages GitHub
Pages

Window

Functions

confirm
(
message
:
String
)
:
Promise(String, Void)

Shows the default confirm popup of the browser with the given message.

This function returns a promise but blocks execution until the popup is closed.

Gets the with of the scrollbar.

Window.getScrollbarWidth() == 10
height
:
Number

Returns the height of the window in pixels.

href
:
String

Returns the windows URL as a string.

navigate
(
url
:
String
)
:
Promise(Never, Void)

Navigates to the given URL.

open
(
url
:
String
)
:
Promise(Never, Void)

Opens the given url in a new window.

Window.open("https://www.google.com")
prompt
(
label
:
String
current
:
String
)
:
Promise(String, String)

Shows the default prompt popup of the browser with the given message and value.

This function returns a promise but blocks execution until the popup is closed.

Returns the scrollable height of the window in pixels.

scrollLeft
:
Number

Returns the horizontal scroll position of the window in pixels.

scrollTop
:
Number

Returns the vertical scroll position of the window in pixels.

Returns the scrollable width of the window in pixels.

setScrollLeft
(
position
:
Number
)
:
Promise(Never, Void)

Sets the vertical scroll position of the window in pixels.

setScrollTop
(
position
:
Number
)
:
Promise(Never, Void)

Sets the horizontal scroll position of the window in pixels.

setTitle
(
title
:
String
)
:
Promise(Never, Void)

Sets the windows title.

setUrl
(
url
:
String
)
:
Promise(Never, Void)

Sets the URL of the window without navigating to it.

title
:
String

Returns the windows title.

url
:
Url

Returns the current Url of the window.

width
:
Number

Returns the width of the window in pixels.