git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Marked all the appropriate methods as being deprecated for the 1.1.4 release (in...
[jquery.git]
/
src
/
selector
/
selector.js
diff --git
a/src/selector/selector.js
b/src/selector/selector.js
index
f2c224a
..
b15ee7c
100644
(file)
--- a/
src/selector/selector.js
+++ b/
src/selector/selector.js
@@
-53,8
+53,12
@@
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"
},
},
+ // DEPRECATED
"[": "jQuery.find(m[2],a).length"
},
"[": "jQuery.find(m[2],a).length"
},
@@
-63,6
+67,7
@@
jQuery.extend({
// Match: [@value='test'], [@foo]
/^\[ *(@)([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,
// Match: [@value='test'], [@foo]
/^\[ *(@)([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,
+ // DEPRECATED
// Match: [div], [div p]
/^(\[)\s*(.*?(\[.*?\])?[^[]*?)\s*\]/,
// Match: [div], [div p]
/^(\[)\s*(.*?(\[.*?\])?[^[]*?)\s*\]/,
@@
-104,11
+109,13
@@
jQuery.extend({
// Set the correct context (if none is provided)
context = context || document;
// Set the correct context (if none is provided)
context = context || document;
+ // DEPRECATED
// Handle the common XPath // expression
if ( !t.indexOf("//") ) {
//context = context.documentElement;
t = t.substr(2,t.length);
// Handle the common XPath // expression
if ( !t.indexOf("//") ) {
//context = context.documentElement;
t = t.substr(2,t.length);
+ // DEPRECATED
// And the / root expression
} else if ( !t.indexOf("/") && !context.ownerDocument ) {
context = context.documentElement;
// And the / root expression
} else if ( !t.indexOf("/") && !context.ownerDocument ) {
context = context.documentElement;
@@
-126,6
+133,7
@@
jQuery.extend({
var r = [];
last = t;
var r = [];
last = t;
+ // DEPRECATED
t = jQuery.trim(t).replace( /^\/\//, "" );
var foundToken = false;
t = jQuery.trim(t).replace( /^\/\//, "" );
var foundToken = false;
@@
-149,6
+157,7
@@
jQuery.extend({
if ( t.indexOf(" ") == 0 ) continue;
foundToken = true;
} else {
if ( t.indexOf(" ") == 0 ) continue;
foundToken = true;
} else {
+ // (.. and /) DEPRECATED
re = /^((\/?\.\.)|([>\/+~]))\s*(\w*)/i;
if ( (m = re.exec(t)) != null ) {
re = /^((\/?\.\.)|([>\/+~]))\s*(\w*)/i;
if ( (m = re.exec(t)) != null ) {
@@
-171,6
+180,7
@@
jQuery.extend({
if ( m == "+" ) break;
}
if ( m == "+" ) break;
}
+ // DEPRECATED
} else
r.push( ret[j].parentNode );
} else
r.push( ret[j].parentNode );
@@
-402,7
+412,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 );