2 * Checks a node for validity as a jQuery selector context
3 * @param {Element|Object=} context
4 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
6 export function testContext( context ) {
7 return context && typeof context.getElementsByTagName !== "undefined" && context;