mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
cleanup: rm iQ.makeArray
This commit is contained in:
parent
1edcad44f0
commit
8e181c230e
@ -201,7 +201,20 @@ iQ.fn = iQ.prototype = {
|
||||
this.context = selector.context;
|
||||
}
|
||||
|
||||
return iQ.makeArray( selector, this );
|
||||
// this used to be makeArray:
|
||||
var ret = this || [];
|
||||
if ( selector != null ) {
|
||||
// The window, strings (and functions) also have 'length'
|
||||
// The extra typeof function check is to prevent crashes
|
||||
// in Safari 2 (See: #3039)
|
||||
if ( selector.length == null || typeof selector === "string" || iQ.isFunction(selector) || (typeof selector !== "function" && selector.setInterval) ) {
|
||||
push.call( ret, selector );
|
||||
} else {
|
||||
iQ.merge( ret, selector );
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
||||
},
|
||||
|
||||
// Start with an empty selector
|
||||
@ -962,26 +975,6 @@ iQ.extend({
|
||||
return (text || "").replace( rtrim, "" );
|
||||
},
|
||||
|
||||
// ----------
|
||||
// Function: makeArray
|
||||
// results is for internal usage only
|
||||
makeArray: function( array, results ) {
|
||||
var ret = results || [];
|
||||
|
||||
if ( array != null ) {
|
||||
// The window, strings (and functions) also have 'length'
|
||||
// The extra typeof function check is to prevent crashes
|
||||
// in Safari 2 (See: #3039)
|
||||
if ( array.length == null || typeof array === "string" || iQ.isFunction(array) || (typeof array !== "function" && array.setInterval) ) {
|
||||
push.call( ret, array );
|
||||
} else {
|
||||
iQ.merge( ret, array );
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
},
|
||||
|
||||
// ----------
|
||||
// Function: inArray
|
||||
inArray: function( elem, array ) {
|
||||
|
Loading…
Reference in New Issue
Block a user