Skip to main content

selector_uses_state

Function selector_uses_state 

Source
pub fn selector_uses_state(sel: &Selector, state: &str) -> bool
Expand description

セレクタ全体(チェーンなら全ステップ)が state を参照しているか。

a:hover span のように祖先側に付く場合があるため、末尾だけを見てはいけない。 計算量: O(Steps × P) — Steps はチェーンの段数。 末尾だけでなく全段を見る必要がある(a:hover span)。