2016-01-09 13:36:35 -05:00
|
|
|
define( [
|
|
|
|
"../core"
|
|
|
|
], function( jQuery ) {
|
|
|
|
|
2016-06-11 11:55:39 -04:00
|
|
|
"use strict";
|
|
|
|
|
2016-01-09 13:36:35 -05:00
|
|
|
function getAll( context, tag ) {
|
|
|
|
|
2016-06-11 11:55:39 -04:00
|
|
|
// Support: IE <=9 - 11 only
|
2016-01-09 13:36:35 -05:00
|
|
|
// Use typeof to avoid zero-argument method invocation on host objects (#15151)
|
2016-09-23 02:57:24 -04:00
|
|
|
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 && jQuery.nodeName( context, tag ) ) {
|
|
|
|
return jQuery.merge( [ context ], ret );
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
2016-01-09 13:36:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return getAll;
|
|
|
|
} );
|