plinth/browser/document
Types
Functions
pub fn add_event_listener(
type_: String,
listener: fn(Event(a)) -> Nil,
) -> Nil
pub fn create_element(tag_name: String) -> Element
pub fn create_text_node(content: String) -> Element
pub fn exit_fullscreen(
document: Document,
) -> Promise(Result(Nil, String))
exitFullscreen() requests that the element on this document which is currently being presented in fullscreen mode be taken out of fullscreen mode, restoring the previous state of the screen.
pub fn fullscreen_element(
document: Document,
) -> Result(Element, Nil)
returns the Element that is currently being presented in fullscreen mode in this document.
pub fn get_element_by_id(id: String) -> Result(Element, Nil)
pub fn get_elements_by_tag_name(
tag_name: String,
) -> Array(Element)
pub fn query_selector(selector: String) -> Result(Element, Nil)
pub fn query_selector_all(selector: String) -> Array(Element)
pub fn ready_state() -> String
pub fn set_title(title: String) -> Nil
Set the title
attribute value of the current document.
pub fn visibility_state() -> String
Get the visibilityState
attribute value of the current document. It should be either "visible"
or "hidden"
.