plinth/browser/document

Functions

pub fn add_event_listener(
  type_: String,
  listener: fn(Event) -> Nil,
) -> Nil
pub fn body() -> Element
pub fn create_element(tag_name: String) -> Element
pub fn create_text_node(content: String) -> Element
pub fn get_element_by_id(id: String) -> Result(Element, Nil)
pub fn hidden() -> Bool

Get the hidden attribute value of the current document

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 visibility_state() -> String

Get the visibilityState attribute value of the current document. It should be either "visible" or "hidden".

Search Document