( context, tag )
| 4546 | |
| 4547 | |
| 4548 | function getAll( context, tag ) { |
| 4549 | var elems, elem, |
| 4550 | i = 0, |
| 4551 | found = typeof context.getElementsByTagName !== "undefined" ? |
| 4552 | context.getElementsByTagName( tag || "*" ) : |
| 4553 | typeof context.querySelectorAll !== "undefined" ? |
| 4554 | context.querySelectorAll( tag || "*" ) : |
| 4555 | undefined; |
| 4556 | |
| 4557 | if ( !found ) { |
| 4558 | for ( found = [], elems = context.childNodes || context; |
| 4559 | ( elem = elems[ i ] ) != null; |
| 4560 | i++ |
| 4561 | ) { |
| 4562 | if ( !tag || jQuery.nodeName( elem, tag ) ) { |
| 4563 | found.push( elem ); |
| 4564 | } else { |
| 4565 | jQuery.merge( found, getAll( elem, tag ) ); |
| 4566 | } |
| 4567 | } |
| 4568 | } |
| 4569 | |
| 4570 | return tag === undefined || tag && jQuery.nodeName( context, tag ) ? |
| 4571 | jQuery.merge( [ context ], found ) : |
| 4572 | found; |
| 4573 | } |
| 4574 | |
| 4575 | |
| 4576 | // Mark scripts as having already been evaluated |
no outgoing calls
no test coverage detected