Module dom

Source
Expand description

Types and traits used to access the DOM from style calculation.

Structs§

DomChildren
An iterator over the DOM children of a node.
DomDescendants
An iterator over the DOM descendants of a node in pre-order.
LayoutIterator
A node iterator that only returns node that don’t need layout.
OpaqueNode
An opaque handle to a node, which, unlike UnsafeNode, cannot be transformed back into a non-opaque representation. The only safe operation that can be performed on this node is to compare it to another opaque handle or to another OpaqueNode.
SendElement
Same reason as for the existence of SendNode, SendElement does the proper things for a given TElement.
SendNode
TNode and TElement aren’t Send because we want to be careful and explicit about our parallel traversal. However, there are certain situations (including but not limited to the traversal) where we need to send DOM objects to other threads.
ShowSubtree
Wrapper to output the subtree rather than the single node when formatting for Debug.
ShowSubtreeData
Wrapper to output the subtree along with the ElementData when formatting for Debug.
ShowSubtreeDataAndPrimaryValues
Wrapper to output the subtree along with the ElementData and primary ComputedValues when formatting for Debug. This is extremely verbose.

Traits§

NodeInfo
Simple trait to provide basic information about the type of an element.
TDocument
The TDocument trait, to represent a document node.
TElement
The element trait, the main abstraction the style crate acts over.
TNode
The TNode trait. This is the main generic trait over which the style system can be implemented.
TShadowRoot
The ShadowRoot trait.

Functions§

fmt_subtree 🔒
fmt_with_data 🔒
fmt_with_data_and_primary_values 🔒