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
Event-related utilities.
queue
Async queue.
sleep
Sleeping.
spawn
Background task spawning.

Macros§

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

Structs§

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

Functions§

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