glendix/js/dom
Provides typed DOM element operations at the JavaScript FFI boundary.
Types
Represents a DOM element handle.
pub type DomElement
Values
pub fn click(element element: DomElement) -> Nil
Dispatches the element’s native click behavior.
pub fn get_bounding_client_rect(
element element: DomElement,
) -> DomRect
Reads the element’s bounding client rectangle.
pub fn query_selector(
in element: DomElement,
matching selector: String,
) -> option.Option(DomElement)
Finds the first descendant matching a CSS selector.
pub fn scroll_into_view(element element: DomElement) -> Nil
Scrolls an element into the viewport.