Initial commit
This commit is contained in:
32
node_modules/jquery/src/manipulation/getAll.js
generated
vendored
Normal file
32
node_modules/jquery/src/manipulation/getAll.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
define( [
|
||||
"../core",
|
||||
"../core/nodeName"
|
||||
], function( jQuery, nodeName ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function getAll( context, tag ) {
|
||||
|
||||
// Support: IE <=9 - 11 only
|
||||
// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)
|
||||
var ret;
|
||||
|
||||
if ( typeof context.getElementsByTagName !== "undefined" ) {
|
||||
ret = context.getElementsByTagName( tag || "*" );
|
||||
|
||||
} else if ( typeof context.querySelectorAll !== "undefined" ) {
|
||||
ret = context.querySelectorAll( tag || "*" );
|
||||
|
||||
} else {
|
||||
ret = [];
|
||||
}
|
||||
|
||||
if ( tag === undefined || tag && nodeName( context, tag ) ) {
|
||||
return jQuery.merge( [ context ], ret );
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
return getAll;
|
||||
} );
|
||||
Reference in New Issue
Block a user