Module seed::browser::util

source ·
Expand description

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

Structs

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 access the web_sys DOM document.
  • errorDeprecated
    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.
  • logDeprecated
    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