pub fn selector_uses_state(sel: &Selector, state: &str) -> bool
セレクタ全体(チェーンなら全ステップ)が state を参照しているか。
state
a:hover span のように祖先側に付く場合があるため、末尾だけを見てはいけない。 計算量: O(Steps × P) — Steps はチェーンの段数。 末尾だけでなく全段を見る必要がある(a:hover span)。
a:hover span