源代码这样
// Check to see if it's possible to do matchesSelector
// on a disconnected node (IE 9 fails this)
var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
pseudoWorks = false;
try {
// This should fail with an exception
// Gecko does not error, returns false instead
matches.call( document.documentElement, "[test!='']:sizzle" );
} catch( pseudoError ) {
pseudoWorks = true;
}
第5200行代码matches.call( document.documentElement, "[test!='']:sizzle" )看不懂,"[test!='']:sizzle"是css选择器的写法吗,test是属性,sizzle是伪类吗?。。。
难道是为了检测选择器功能是否正常,故意这样写,然后期待抛出异常