workflow_dom/lib.rs
1//!
2//! [<img alt="github" src="https://img.shields.io/badge/github-workflow--rs-8da0cb?style=for-the-badge&labelColor=555555&color=8da0cb&logo=github" height="20">](https://github.com/workflow-rs/workflow-rs)
3//! [<img alt="crates.io" src="https://img.shields.io/crates/v/workflow-dom.svg?maxAge=2592000&style=for-the-badge&color=fc8d62&logo=rust" height="20">](https://crates.io/crates/workflow-dom)
4//! [<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-workflow--dom-56c2a5?maxAge=2592000&style=for-the-badge&logo=docs.rs" height="20">](https://docs.rs/workflow-dom)
5//! <img alt="license" src="https://img.shields.io/crates/l/workflow-dom.svg?maxAge=2592000&color=6ac&style=for-the-badge&logoColor=fff" height="20">
6//! <img src="https://img.shields.io/badge/platform- wasm32/browser -informational?style=for-the-badge&color=50a0f0" height="20">
7//!
8//! DOM manipulation utilities.
9//!
10//! Provides DOM injection functionality allowing injecting
11//! buffer slices into DOM as [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
12//! objects and loading them as `<script>` or `<style>` elements.
13//! This crate is useful for embedding JavaScript sources and
14//! stylesheets directly into WASM files or loading JavaSctipt code
15//! from external resources such as a WebSocket.
16//!
17//! Example:
18//!
19//! ```ignore
20//! use workflow_dom::inject::{inject_blob, Content};
21//!
22//! let DATA: &[u8] = include_bytes!("source.js");
23//! inject_blob(Content::Script(None, data)).await?;
24//! ```
25
26/// Bindings to the browser `navigator.clipboard` API for reading from
27/// and writing to the system clipboard.
28pub mod clipboard;
29/// Utilities for triggering browser file downloads from in-memory data.
30pub mod download;
31pub mod error;
32pub mod inject;
33/// Utilities for opening URLs in a new browser tab.
34pub mod link;
35/// Runtime loader for injecting JavaScript modules, scripts and CSS
36/// stylesheets into the DOM and resolving dependencies between them.
37pub mod loader;
38pub mod result;
39pub mod utils;