Crate js_utils

source ·
Expand description

Useful utilities to make development of browser-targeted Rust applications slightly less painful.

Re-exports

pub use spawn::spawn;
pub use sleep::sleep;
pub use queue::Queue;

Modules

Event-related utilities.
Async queue.
Sleeping.
Background task spawning.

Macros

Helper macro for creating wasm_bindgen closures.
Macro for error to add arguments support (like in print macro).
Macro for log to add arguments support (like in print macro).
Macro for warn to add arguments support (like in print macro).

Structs

Wrapper for JsValue errors implementing std::error::Error.

Functions

Gets document’s body.
Gets document object.
Outputs an error message to the web console.
Outputs a message to the web console.
Sets a panic hook that forwards panic messages to console.error.
Outputs a warning message to the web console.
Gets window object.