Skip to main content

get_or_create_selector

Function get_or_create_selector 

Source
pub fn get_or_create_selector(css: &str) -> ParserResult<Selector>
Expand description

获取或创建动态选择器(带缓存)

先从缓存查找,如果不存在则编译并存入缓存。 如果选择器字符串无效,返回 ParserError::SelectorError