forked from mootools/slick
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Arian
committed
Mar 9, 2011
1 parent
a2796ca
commit 394c5ff
Showing
5 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,7 @@ local.setDocument = function(document){ | |
= features.brokenMixedCaseQSA | ||
= features.brokenGEBCN | ||
= features.brokenCheckedQSA | ||
= features.brokenGeneralSiblingCombinator | ||
= features.brokenEmptyAttributeQSA | ||
= features.isHTMLDocument | ||
= features.nativeMatchesSelector | ||
|
@@ -146,6 +147,13 @@ local.setDocument = function(document){ | |
features.brokenCheckedQSA = (testNode.querySelectorAll(':checked').length == 0); | ||
} catch(e){}; | ||
|
||
try { | ||
testNode.innerHTML = '<div id="foo"></div><div></div>'; | ||
features.brokenGeneralSiblingCombinator = !(testNode.getElementById('foo').querySelector('~ div')); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
seanmonstar
|
||
} catch(e){ | ||
features.brokenGeneralSiblingCombinator = true; | ||
} | ||
|
||
// IE returns incorrect results for attr[*^$]="" selectors on querySelectorAll | ||
try { | ||
testNode.innerHTML = '<a class=""></a>'; | ||
|
@@ -331,6 +339,7 @@ local.search = function(context, expression, append, first){ | |
|
||
if (!this.isHTMLDocument || this.brokenMixedCaseQSA || qsaFailExpCache[expression] || | ||
(this.brokenCheckedQSA && expression.indexOf(':checked') > -1) || | ||
(this.brokenGeneralSiblingCombinator) || | ||
(this.brokenEmptyAttributeQSA && reEmptyAttribute.test(expression)) || Slick.disableQSA) break querySelector; | ||
|
||
var _expression = expression; | ||
|
1 comment
on commit 394c5ff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
change this to '#foo ~ div' i'd say