Struct sauron::Window [−][src]
pub struct Window;
Expand description
Provides access to the Browser window
Implementations
pub fn add_event_listeners<APP, MSG>(
event_listeners: Vec<Attribute<&'static str, &'static str, AttributeValue<MSG>>, Global>
) -> Cmd<Program<APP, MSG>> where
MSG: 'static,
APP: Application<MSG> + 'static,
pub fn add_event_listeners<APP, MSG>(
event_listeners: Vec<Attribute<&'static str, &'static str, AttributeValue<MSG>>, Global>
) -> Cmd<Program<APP, MSG>> where
MSG: 'static,
APP: Application<MSG> + 'static,
attach an event listender to the window
Creates a Cmd in which the MSG will be emitted whenever the browser is resized
pub fn on_hashchange<F, APP, MSG>(cb: F) -> Cmd<Program<APP, MSG>> where
MSG: 'static,
F: Fn(String) -> MSG + Clone + 'static,
APP: Application<MSG> + 'static,
pub fn on_hashchange<F, APP, MSG>(cb: F) -> Cmd<Program<APP, MSG>> where
MSG: 'static,
F: Fn(String) -> MSG + Clone + 'static,
APP: Application<MSG> + 'static,
attached a callback and will be triggered when the hash portion of the window location url is changed
return the hash part of the browser current url location
The hash part are the text right after the #
sign
scroll the browser to the top of the document
set the browser location hash
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Window
impl UnwindSafe for Window
Blanket Implementations
Mutably borrows from an owned value. Read more