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§
- clipboard
- Bindings to the browser
navigator.clipboardAPI for reading from and writing to the system clipboard. - download
- Utilities for triggering browser file downloads from in-memory data.
- error
- Errors return by the
workflow_dommodule - inject
- DOM injection utilities, allowing injection of
scriptandstyleelements from Rust buffers usingBlobobjects. - link
- Utilities for opening URLs in a new browser tab.
- loader
- Runtime loader for injecting JavaScript modules, scripts and CSS stylesheets into the DOM and resolving dependencies between them.
- result
- Result type used by the
workflow_dommodule - utils
- Helper functions for accessing DOM environment