Skip to main content

closest_entity

Function closest_entity 

Source
pub fn closest_entity(
    index: &DomIndex,
    start: Entity,
    selector: &str,
) -> Result<Option<Entity>, String>
Expand description

Walk from start up the ancestor chain (including start) and return the nearest element matching selector (node.closest(sel)).