Crate workflow_dom
source ·Expand description
DOM manipulation utilities.
Provides DOM injection functionality allowing injecting
buffer slices into DOM as Blob
objects and loading them as <script>
or <style>
elements.
This crate is useful for embedding JavaScript sources and
stylesheets directly into WASM files or loading JavaSctipt code
from external resources such as a WebSocket.
Example:
ⓘ
use workflow_dom::inject::{inject_blob, Content};
let DATA: &[u8] = include_bytes!("source.js");
inject_blob(Content::Script(None, data)).await?;
Modules§
- Errors return by the
workflow_dom
module - DOM injection utilities, allowing injection of
script
andstyle
elements from Rust buffers usingBlob
objects. - Result type used by the
workflow_dom
module - Helper functions for accessing DOM environment