Expand description
The core DOM abstraction in Bliss
This crate implements a flexible headless DOM (BaseDocument), designed to be embedded in and driven by external code.
Most users will want to use a wrapper:
HtmlDocumentfrom bliss-html — parse HTML into aBaseDocumentDioxusDocumentfrom dioxus-native — dynamic rendering with Dioxus
This crate provides: DOM tree construction and mutation, CSS parsing and style resolution, layout computation (via taffy), text layout (via parley), event handling, form submission, script execution, text selection, and URL resolution.
Companion crates: bliss-html (parsing), bliss-net (networking), bliss-paint (rendering), bliss-shell (windowing).
§Feature Flags
tracing: Enabletracingspans for performance instrumentationincremental: Enable incremental layout with damage propagation (default: full relayout)parallel-construct: Parallelize inline layout construction with rayonaccessibility: Enable accessibility tree supportfile_input: Enable file upload form controlsserde: Enable serialization support
Re-exports§
pub use node::Attribute;pub use node::ElementData;pub use node::Node;pub use node::NodeData;pub use node::TextNodeData;pub use util::Point;
Modules§
- net
- Networking and resource loading.
- node
- DOM node types:
Node,NodeData,ElementData,Attribute,TextNodeData. - util
- Shared utility types.
Macros§
- local_
name - Takes a local name as a string and returns its key in the string cache.
- namespace_
prefix - Takes a namespace prefix string and returns its key in a string cache.
- namespace_
url - Takes a namespace url string and returns its key in a string cache.
- ns
- Maps the input of
namespace_prefix!to the output ofnamespace_url!. - qual_
name - Creates an markup5ever::QualName. Given a local name and an optional namespace
Structs§
- Base
Document - Document
Config - Options used when constructing a
BaseDocument - Document
Mutator - Dummy
Html Parser Provider - Event
Driver - Execution
Context - Context for script execution
- Font
Context - A font database/cache (wrapper around a Fontique
CollectionandSourceCache). - Namespace
Static Set - Noop
Event Handler - Noop
Script Engine - A no-op script engine for when no scripting is needed
- Plain
Document - Policy
DomController - A wrapper that combines BaseDocument with a policy for capability-based control
- Prefix
Static Set - Qual
Name - A fully qualified name (with a namespace), used to depict names of tags and attributes.
- Restyle
Hint - The kind of restyle we need to do for a given element.
Enums§
- DocGuard
- DocGuard
Mut - Event
Handled - Whether an event was handled by script
- Script
Error - Script execution errors
- Script
Language - Language identifiers
- Script
Value - Result of script execution
Constants§
Traits§
- Document
- Abstraction over wrappers around
BaseDocumentto allow for them all to be driven bybliss-shell - Event
Handler - Html
Parser Provider - Script
Engine - Script engine trait - implement for Boa, V8, NanoVM, etc.
Type Aliases§
- Atom
- Boxed
Script Engine - Boxed script engine for storage in documents
- Local
Name - Namespace
- Prefix
- Script
Error Callback - Type for script error callbacks
- Selector
List