MCPcopy Create free account
hub / github.com/JsAaron/jQuery / getAll

Function getAll

2.1.1/test/jquery-1.11.1.js:5326–5346  ·  view source on GitHub ↗
( context, tag )

Source from the content-addressed store, hash-verified

5324wrapMap.th = wrapMap.td;
5325
5326function getAll( context, tag ) {
5327 var elems, elem,
5328 i = 0,
5329 found = typeof context.getElementsByTagName !== strundefined ? context.getElementsByTagName( tag || "*" ) :
5330 typeof context.querySelectorAll !== strundefined ? context.querySelectorAll( tag || "*" ) :
5331 undefined;
5332
5333 if ( !found ) {
5334 for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
5335 if ( !tag || jQuery.nodeName( elem, tag ) ) {
5336 found.push( elem );
5337 } else {
5338 jQuery.merge( found, getAll( elem, tag ) );
5339 }
5340 }
5341 }
5342
5343 return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
5344 jQuery.merge( [ context ], found ) :
5345 found;
5346}
5347
5348// Used in buildFragment, fixes the defaultChecked property
5349function fixDefaultChecked( elem ) {

Callers 1

jquery-1.11.1.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected