提交 008b9cd9 编写于 作者: R RubaXa

#44: Support SVG

上级 70fc6dec
......@@ -430,12 +430,19 @@
var
tag = selector.shift().toUpperCase()
, re = new RegExp('\\s('+selector.join('|')+')\\s', 'g')
, className
;
do {
className = el.className;
if (className && className.baseVal) { // SVG
className = className.baseVal;
}
if(
(tag === '' || el.nodeName == tag)
&& (!selector.length || ((' '+el.className+' ').match(re) || []).length == selector.length)
&& (!selector.length || ((' '+className+' ').match(re) || []).length == selector.length)
){
return el;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册