aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2008-12-22 16:41:14 +0000
committerJohn Resig <jeresig@gmail.com>2008-12-22 16:41:14 +0000
commit47aed822a43a02597f3b624f0efdcb4993212adf (patch)
treef753c7bd1a82136bc34e148a34489294ca63e679 /src
parent77477d56346b094f0be6985aae8e118655b8c6ec (diff)
downloadjquery-47aed822a43a02597f3b624f0efdcb4993212adf.tar.gz
jquery-47aed822a43a02597f3b624f0efdcb4993212adf.zip
Synced with Sizzle codebase (which removed the use of the caching code).
Diffstat (limited to 'src')
-rw-r--r--src/selector.js18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/selector.js b/src/selector.js
index a74974042..d9703e517 100644
--- a/src/selector.js
+++ b/src/selector.js
@@ -7,17 +7,8 @@
var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]+\]|[^[\]]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g;
-var cache = null;
var done = 0;
-if ( document.addEventListener && !document.querySelectorAll ) {
- cache = {};
- var invalidate = function(){ cache = {}; };
- document.addEventListener("DOMAttrModified", invalidate, false);
- document.addEventListener("DOMNodeInserted", invalidate, false);
- document.addEventListener("DOMNodeRemoved", invalidate, false);
-}
-
var Sizzle = function(selector, context, results, seed) {
var doCache = !results;
results = results || [];
@@ -30,11 +21,6 @@ var Sizzle = function(selector, context, results, seed) {
return results;
}
- if ( cache && context === document && cache[ selector ] ) {
- results.push.apply( results, cache[ selector ] );
- return results;
- }
-
var parts = [], m, set, checkSet, check, mode, extra;
// Reset the position of the chunker regexp (start from head)
@@ -136,10 +122,6 @@ var Sizzle = function(selector, context, results, seed) {
Sizzle( extra, context, results );
}
- if ( cache && doCache ) {
- cache[selector] = results.slice(0);
- }
-
return results;
};