scratch – Blame information for rev 126

Subversion Repositories:
Rev:
Rev Author Line No. Line
58 office 1 define( [
2 "../core"
3 ], function( jQuery ) {
4  
5 "use strict";
6  
7 function getAll( context, tag ) {
8  
9 // Support: IE <=9 - 11 only
10 // Use typeof to avoid zero-argument method invocation on host objects (#15151)
11 var ret;
12  
13 if ( typeof context.getElementsByTagName !== "undefined" ) {
14 ret = context.getElementsByTagName( tag || "*" );
15  
16 } else if ( typeof context.querySelectorAll !== "undefined" ) {
17 ret = context.querySelectorAll( tag || "*" );
18  
19 } else {
20 ret = [];
21 }
22  
23 if ( tag === undefined || tag && jQuery.nodeName( context, tag ) ) {
24 return jQuery.merge( [ context ], ret );
25 }
26  
27 return ret;
28 }
29  
30 return getAll;
31 } );