Expand description

Provide a wrapper for commonly-used, but verbose web_sys features. This module is decoupled / independent.

Structs

Traits

Prevent repetition when wrapping closures.

Functions

Convenience function to access the web_sys DOM body.

Convenience function to access the web_sys::HtmlCanvasElement. /// Note: Returns None if there is no element with the given id or the element isn’t HtmlCanvasElement.

Convenience function to access the web_sys::CanvasRenderingContext2d.

Convenience function to get all cookies from the current HtmlDocument Note: Returns None if parsing cookies fails or there are no cookies.

Convenience function to access the web_sys DOM document.

Similar to log, but for errors.

Similar to get_value

Simplify getting the value of input elements; required due to the need to cast from general nodes/elements to HTML_Elements.

Convenience function to access the web_sys history.

Convenience function to access the web_sys::HtmlDocument.

Convenience function for logging to the web browser’s console. See also the log! macro, which is more flexible.

Request the animation frame.

Similar to set_value.

Similar to get_value.

Convenience function to avoid repeating expect logic.

Type Definitions