Plato on Github
Report Home
src/manipulation/getAll.js
Maintainability
65.50
Lines of code
31
Difficulty
17.06
Estimated Errors
0.12
Function weight
By Complexity
By SLOC
define( [ "../core" ], function( jQuery ) { "use strict"; function getAll( context, tag ) { // Support: IE <=9 - 11 only // Use typeof to avoid zero-argument method invocation on host objects (#15151) 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; } return getAll; } );