Merging from Sizzle (fixed a bug when querySelectorAll is used.
This commit is contained in:
parent
4694e537bc
commit
558d03f24c
1 changed files with 4 additions and 3 deletions
|
@ -684,21 +684,22 @@ try {
|
|||
if ( document.querySelectorAll ) (function(){
|
||||
var oldSizzle = Sizzle;
|
||||
|
||||
Sizzle = function(query, context, extra){
|
||||
Sizzle = function(query, context, extra, seed){
|
||||
context = context || document;
|
||||
|
||||
if ( context.nodeType === 9 ) {
|
||||
if ( !seed && context.nodeType === 9 ) {
|
||||
try {
|
||||
return makeArray( context.querySelectorAll(query) );
|
||||
} catch(e){}
|
||||
}
|
||||
|
||||
return oldSizzle(query, context, extra);
|
||||
return oldSizzle(query, context, extra, seed);
|
||||
};
|
||||
|
||||
Sizzle.find = oldSizzle.find;
|
||||
Sizzle.filter = oldSizzle.filter;
|
||||
Sizzle.selectors = oldSizzle.selectors;
|
||||
Sizzle.matches = oldSizzle.matches;
|
||||
})();
|
||||
|
||||
if ( document.documentElement.getElementsByClassName ) {
|
||||
|
|
Loading…
Reference in a new issue