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)
|
|
|
|
var ret = typeof context.getElementsByTagName !== "undefined" ?
|
|
|
|
context.getElementsByTagName( tag || "*" ) :
|
|
|
|
typeof context.querySelectorAll !== "undefined" ?
|
|
|
|
context.querySelectorAll( tag || "*" ) :
|
|
|
|
[];
|
|
|
|
|
|
|
|
return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
|
|
|
|
jQuery.merge( [ context ], ret ) :
|
|
|
|
ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
return getAll;
|
|
|
|
} );
|