aboutsummaryrefslogtreecommitdiffstats
path: root/bower_components/jquery/src/manipulation/getAll.js
diff options
context:
space:
mode:
authorLibravatarDererk <dererk@satellogic.com>2016-11-15 14:18:46 -0300
committerLibravatarDererk <dererk@satellogic.com>2016-11-15 14:18:46 -0300
commitffb671c61a24a9086343b54bad080e145ff33fc5 (patch)
tree2c5291f7a34edf4afdc8e07887a148291bfa3fa1 /bower_components/jquery/src/manipulation/getAll.js
parent4e3224c012df9f74f010eb92203520515e8537b9 (diff)
New upstream version 7.8.1upstream/7.8.1
Diffstat (limited to 'bower_components/jquery/src/manipulation/getAll.js')
-rw-r--r--bower_components/jquery/src/manipulation/getAll.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/bower_components/jquery/src/manipulation/getAll.js b/bower_components/jquery/src/manipulation/getAll.js
new file mode 100644
index 0000000..d049b79
--- /dev/null
+++ b/bower_components/jquery/src/manipulation/getAll.js
@@ -0,0 +1,33 @@
+define( [
+ "../core"
+], function( jQuery ) {
+
+function getAll( context, tag ) {
+ var elems, elem,
+ i = 0,
+ found = typeof context.getElementsByTagName !== "undefined" ?
+ context.getElementsByTagName( tag || "*" ) :
+ typeof context.querySelectorAll !== "undefined" ?
+ context.querySelectorAll( tag || "*" ) :
+ undefined;
+
+ if ( !found ) {
+ for ( found = [], elems = context.childNodes || context;
+ ( elem = elems[ i ] ) != null;
+ i++
+ ) {
+ if ( !tag || jQuery.nodeName( elem, tag ) ) {
+ found.push( elem );
+ } else {
+ jQuery.merge( found, getAll( elem, tag ) );
+ }
+ }
+ }
+
+ return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+ jQuery.merge( [ context ], found ) :
+ found;
+}
+
+return getAll;
+} );