Crate blitz_dom

Crate blitz_dom 

Source
Expand description

The core DOM abstraction in Blitz

This crate implements a flexible headless DOM (BaseDocument), which is designed to emebedded in and “driven” by external code. Most users will want to use a wrapper:

It includes: A DOM tree respresentation, CSS parsing and resolution, layout and event handling. Additional functionality is available in separate crates, including html parsing (blitz-html), networking (blitz-net), rendering (blitz-paint) and windowing (blitz-shell).

Most of the functionality in this crates is provided through the struct.

blitz-dom has a native Rust API that is designed for higher-level abstractions to be built on top (although it can also be used directly).

The goal behind this crate is that any implementor can interact with the DOM and render it out using any renderer they want.

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
node
The nodes themsleves, and their data.
util

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
FontContext
A font database/cache (wrapper around a Fontique Collection and SourceCache).
NamespaceStaticSet
NoopEventHandler
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.

Constants§

DEFAULT_CSS

Traits§

Document
Abstraction over wrappers around BaseDocument to allow for them all to be driven by blitz-shell
EventHandler
HtmlParserProvider

Type Aliases§

Atom
LocalName
Namespace
Prefix
SelectorList