Window
Functions
Adds a listener to the window and returns the function which removes this listener.
Adds a media query listener to the window and returns the function which removes this listener.
Shows the default alert popup of the browser with the given message.
This function returns a promise but blocks execution until the popup is closed.
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 width of the scrollbar.
Window.getScrollbarWidth() == 10
Returns the height of the window in pixels.
Returns the windows URL as a string.
Returns true if the given url is the same as the current url of the page.
Returns true
if the given media query matches.
Navigates to the given URL.
Opens the given url in a new window.
Window.open("https://www.google.com")
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.
Returns the horizontal scroll position of the window in pixels.
Returns the vertical scroll position of the window in pixels.
Returns the scrollable width of the window in pixels.
Sets the vertical scroll position of the window in pixels.
Sets the horizontal scroll position of the window in pixels.
Sets the windows title.
Sets the URL of the window without navigating to it.
Returns the windows title.
Triggers the hash location jump on the page.
When a page loads and the current url has a hash #achor-name
the browser
automatically jumps to the matching anchor tag <a name="achor-name">
, but
this behavior does not happen when the history is manipulated.
This function triggers that behavior.
Returns the current Url
of the window.
Returns the width of the window in pixels.