Skip to main content

build_dom_index

Function build_dom_index 

Source
pub fn build_dom_index(
    query: Query<'_, '_, (Entity, &LumenTag, Option<&LumenClasses>, Option<&LumenId>, Option<&ChildOf>, Option<&Children>), Without<DomHidden>>,
)
Expand description

Rebuild the per-tick DomIndex snapshot from the live tree and publish it for cross-thread readers (script hosts, the C-ABI).

Every spawned element carries a LumenTag, so the query walks all selector-reachable entities; a parent or child that is not itself tagged, such as the window root, is dropped from the element tree.