Skip to main content

Module utils

Module utils 

Source
Expand description

Browser DOM helpers for accessing the window, document and elements.

Structs§

Document
The Document class.
Element
The Element class.
JsValue
Representation of an object owned by JS.
Window
The Window class.

Functions§

document
Returns the global document node, panicking if no browser context exists.
get_element_by_id
Returns the DOM element with the given id, or None if not found.
window
Returns the global window object, panicking if no browser context exists.

Type Aliases§

ElementResult
Result type for DOM operations, carrying a JsValue error on failure.