Struct stdweb::web::Window [] [src]

pub struct Window(_);

The Window object represents a window containing a DOM document.

(JavaScript docs)

Methods

impl Window
[src]

[src]

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

(JavaScript docs)

[src]

The local_storage property allows you to access a local Storage object.

It is similar to the Window::session_storage. The only difference is that, while data stored in local_storage has no expiration time, data stored in session_storage gets cleared when the browsing session ends - that is, when the browser is closed.

(JavaScript docs)

[src]

The session_storage property allows you to access a session Storage object for the current origin.

It is similar to the Window::local_storage, The only difference is that, while data stored in local_storage has no expiration time, data stored in session_storage gets cleared when the browsing session ends.

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, which differs from how session cookies work.

(JavaScript docs)

[src]

Returns a Location object which contains information about the URL of the document and provides methods for changing that URL and loading another URL.

(JavaScript docs)

[src]

You should call this method whenever you're ready to update your animation onscreen. This will request that your animation function be called before the browser performs the next repaint. The number of callbacks is usually 60 times per second, but will generally match the display refresh rate in most web browsers as per W3C recommendation. request_animation_frame() calls are paused in most browsers when running in background tabs or hidden iframes in order to improve performance and battery life.

The callback method is passed a single argument, a f64, which indicates the current time when callbacks queued by requestAnimationFrame() begin to fire. Multiple callbacks in a single frame, therefore, each receive the same timestamp even though time has passed during the computation of every previous callback's workload. This timestamp is a decimal number, in milliseconds, but with a minimal precision of 1ms (1000 µs).

(JavaScript docs)

[src]

Returns the global History object, which provides methods to manipulate the browser history.

(JavaScript docs)

[src]

Returns the width (in pixels) of the browser window viewport including, if rendered, the vertical scrollbar.

(JavaScript docs)

[src]

Returns the height (in pixels) of the browser window viewport including, if rendered, the horizontal scrollbar.

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

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

(JavaScript docs)

[src]

The read-only Window property pageYOffset is an alias for scrollY; as such, it returns the number of pixels the document is currently scrolled along the vertical axis (that is, up or down), with a value of 0.0 indicating that the top edge of the Document is currently aligned with the top edge of the window's content area.

(JavaScript docs)

[src]

This is an alias for scrollX.

(JavaScript docs)

Trait Implementations

impl Clone for Window
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Window
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for Window
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for Window
[src]

impl From<Window> for EventTarget
[src]

[src]

Performs the conversion.

impl TryFrom<EventTarget> for Window
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl InstanceOf for Window
[src]

[src]

Checks whenever a given Reference if of type Self.

impl AsRef<Reference> for Window
[src]

[src]

Performs the conversion.

impl ReferenceType for Window
[src]

[src]

Converts a given reference into a concrete reference-like wrapper. Doesn't do any type checking; highly unsafe to use! Read more

impl From<Window> for Reference
[src]

[src]

Performs the conversion.

impl TryFrom<Window> for Reference
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl TryFrom<Reference> for Window
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl<'_r> TryFrom<&'_r Reference> for Window
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl TryFrom<Value> for Window
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl<'_r> TryFrom<&'_r Value> for Window
[src]

The type returned in the event of a conversion error.

[src]

Performs the conversion.

impl JsSerialize for Window
[src]

impl IEventTarget for Window
[src]

[src]

Adds given event handler to the list of event listeners for the specified EventTarget on which it's called. Read more

[src]

Dispatches an Event at this EventTarget, invoking the affected event listeners in the appropriate order. Read more

impl IWindowOrWorker for Window
[src]

[src]

Sets a timer which executes a function once after the timer expires. Read more

Auto Trait Implementations

impl Send for Window

impl Sync for Window