Skip to main content

has_sibling_match

Function has_sibling_match 

Source
pub(crate) fn has_sibling_match(
    siblings: &[Node],
    my_idx: usize,
    adjacent: bool,
    sel: &SimpleSelector,
) -> bool
Expand description

:has(+ sel)/:has(~ sel) 判定用: siblings(親の子ノード一覧)中の my_idx より 後ろの要素ノードで sel に一致するものがあるか探索する。adjacent が true なら 直後の要素兄弟1つのみ(+)、false なら以降の要素兄弟いずれか(~)を対象にする。