use selectors::{
context::{MatchingMode, QuirksMode},
matching::{matches_selector, MatchingContext},
parser::{AncestorHashes, Selector},
Element,
NthIndexCache,
};
#[inline]
pub fn matches<E: Element>(selector: &Selector<E::Impl>, element: &E) -> bool {
const offset: usize = 0;
const hashes: Option<&AncestorHashes> = None;
const nth_index_cache: Option<&mut NthIndexCache> = None;
let mut context = MatchingContext::new(
MatchingMode::Normal,
None,
nth_index_cache,
QuirksMode::NoQuirks,
);
matches_selector(
selector,
offset,
hashes,
element,
&mut context,
&mut |_, _| {},
)
}