]> source.dussan.org Git - jquery.git/commitdiff
Brought in a fix from Sizzle - IE doesn't have .contains on XML elements.
authorJohn Resig <jeresig@gmail.com>
Mon, 5 Jan 2009 21:59:07 +0000 (21:59 +0000)
committerJohn Resig <jeresig@gmail.com>
Mon, 5 Jan 2009 21:59:07 +0000 (21:59 +0000)
src/selector.js

index b3d8dbc9afe14fa1c496432aec46532054aa61e7..8ade53bddcdb73f59a08247762b6adf08826ba75 100644 (file)
@@ -778,7 +778,7 @@ function dirCheck( dir, cur, doneName, checkSet, nodeCheck ) {
 var contains = document.compareDocumentPosition ?  function(a, b){
        return a.compareDocumentPosition(b) & 16;
 } : function(a, b){
-       return a !== b && a.contains(b);
+       return a !== b && a.contains ? a.contains(b) : true;
 };
 
 // EXPOSE