Skip to main content

Crate bliss_dom

Crate bliss_dom 

Source
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:

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: Enable tracing spans for performance instrumentation
  • incremental: Enable incremental layout with damage propagation (default: full relayout)
  • parallel-construct: Parallelize inline layout construction with rayon
  • accessibility: Enable accessibility tree support
  • file_input: Enable file upload form controls
  • serde: 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 of namespace_url!.
qual_name
Creates an markup5ever::QualName. Given a local name and an optional namespace

Structs§

BaseDocument
DocumentConfig
Options used when constructing a BaseDocument
DocumentMutator
DummyHtmlParserProvider
EventDriver
ExecutionContext
Context for script execution
FontContext
A font database/cache (wrapper around a Fontique Collection and SourceCache).
NamespaceStaticSet
NoopEventHandler
NoopScriptEngine
A no-op script engine for when no scripting is needed
PlainDocument
PolicyDomController
A wrapper that combines BaseDocument with a policy for capability-based control
PrefixStaticSet
QualName
A fully qualified name (with a namespace), used to depict names of tags and attributes.
RestyleHint
The kind of restyle we need to do for a given element.

Enums§

DocGuard
DocGuardMut
EventHandled
Whether an event was handled by script
ScriptError
Script execution errors
ScriptLanguage
Language identifiers
ScriptValue
Result of script execution

Constants§

BULLET_FONT
DEFAULT_CSS

Traits§

Document
Abstraction over wrappers around BaseDocument to allow for them all to be driven by bliss-shell
EventHandler
HtmlParserProvider
ScriptEngine
Script engine trait - implement for Boa, V8, NanoVM, etc.

Type Aliases§

Atom
BoxedScriptEngine
Boxed script engine for storage in documents
LocalName
Namespace
Prefix
ScriptErrorCallback
Type for script error callbacks
SelectorList