Module util

Source
Expand description

utility functions

Functionsยง

body
provides access to the document body
document
provides access to the document element
get_location_hash
return the hash part of the browser current url location The hash part are the text right after the # sign
get_window_size
return the size of the browser at this moment
history
utility function which returns the history api of the browser
inject_style
inject style to document head
now
return the instantaneous time
performance
provides access to the window Performance api
scroll_window_to_top
scroll the browser to the top of the document
set_location_hash
set the browser location hash
set_window_title
set the title of the document
spawn_local
Runs a Rust Future on the current thread.
window
utility function which returns the Window element