A follow-up for bug #3945. ID selectors don't work in querySelectorAll on XML documents, so we just fall back to the normal engine.
This commit is contained in:
parent
7d9d210540
commit
d45f193948
2 changed files with 5 additions and 3 deletions
|
@ -723,7 +723,9 @@ if ( document.querySelectorAll ) (function(){
|
|||
Sizzle = function(query, context, extra, seed){
|
||||
context = context || document;
|
||||
|
||||
if ( !seed && context.nodeType === 9 ) {
|
||||
// Only use querySelectorAll on non-XML documents
|
||||
// (ID selectors don't work in non-HTML documents)
|
||||
if ( !seed && context.nodeType === 9 && !isXML(context) ) {
|
||||
try {
|
||||
return makeArray( context.querySelectorAll(query), extra );
|
||||
} catch(e){}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue