Struct stdweb::web::Window
[−]
[src]
pub struct Window(_);
The Window
object represents a window containing a DOM document.
Methods
impl Window
[src]
fn alert(&self, message: &str)
[src]
The Window.alert() method displays an alert dialog with the optional specified content and an OK button.
fn local_storage(&self) -> Storage
[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.
fn session_storage(&self) -> Storage
[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.
fn location(&self) -> Option<Location>
[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.
Trait Implementations
impl IEventTarget for Window
[src]
fn add_event_listener<T, F>(&self, listener: F) -> EventListenerHandle where
T: ConcreteEvent,
F: FnMut(T) + 'static,
[src]
T: ConcreteEvent,
F: FnMut(T) + 'static,
Adds given event handler to the list the list of event listeners for the specified EventTarget
on which it's called. Read more
fn dispatch_event<T: IEvent>(&self, event: &T) -> bool
[src]
Dispatches an Event
at this EventTarget
, invoking the affected event listeners in the appropriate order. (JavaScript docs) Read more
impl IWindowOrWorker for Window
[src]
fn set_timeout<F: FnOnce() + 'static>(&self, callback: F, timeout: u32)
[src]
Sets a timer which executes a function once after the timer expires. Read more
impl Debug for Window
[src]
fn fmt(&self, formatter: &mut Formatter) -> Result
[src]
Formats the value using the given formatter.
impl Clone for Window
[src]
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl AsRef<Reference> for Window
[src]
impl<R: TryInto<Reference>> TryFrom<R> for Window where
<R as TryInto<Reference>>::Error: Into<Box<Error>>,
[src]
<R as TryInto<Reference>>::Error: Into<Box<Error>>,