Skip to main content

position_in_flat_tree_for_selection

Function position_in_flat_tree_for_selection 

Source
fn position_in_flat_tree_for_selection(
    no_gc: &NoGC,
    container: DomRoot<Node>,
    offset: usize,
) -> FlatTreeNodePosition
Expand description

Find the position of a node and offset in the flat tree for the purposes of selection boundaries. This projects the given position onto the flat tree, accounting for origin nodes that may not actually be in the flat tree at all.