git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed use of eval() and new Function() to work within the correct scope (and not...
[jquery.git]
/
src
/
selector
/
selector.js
diff --git
a/src/selector/selector.js
b/src/selector/selector.js
index
f2c224a
..
bd8c791
100644
(file)
--- a/
src/selector/selector.js
+++ b/
src/selector/selector.js
@@
-53,7
+53,10
@@
jQuery.extend({
image: "'image'==a.type",
reset: "'reset'==a.type",
button: '"button"==a.type||jQuery.nodeName(a,"button")',
image: "'image'==a.type",
reset: "'reset'==a.type",
button: '"button"==a.type||jQuery.nodeName(a,"button")',
- input: "/input|select|textarea|button/i.test(a.nodeName)"
+ input: "/input|select|textarea|button/i.test(a.nodeName)",
+
+ // :has()
+ has: "jQuery.find(m[3],a).length"
},
"[": "jQuery.find(m[2],a).length"
},
},
"[": "jQuery.find(m[2],a).length"
},
@@
-402,7
+405,7
@@
jQuery.extend({
f = jQuery.expr[m[1]][m[2]];
// Build a custom macro to enclose it
f = jQuery.expr[m[1]][m[2]];
// Build a custom macro to enclose it
- eval("f = function(a,i){return " + f + "}");
+ f = eval("false||function(a,i){return " + f + "}");
// Execute it against the current filter
r = jQuery.grep( r, f, not );
// Execute it against the current filter
r = jQuery.grep( r, f, not );