aboutsummaryrefslogtreecommitdiffstats
path: root/src/selector/testContext.js
blob: cb37629f5cc0d5efb6074fb380ca0a0db4b3622c (plain)
1
2
3
4
5
6
7
8
/**
 * Checks a node for validity as a jQuery selector context
 * @param {Element|Object=} context
 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
 */
export function testContext( context ) {
	return context && typeof context.getElementsByTagName !== "undefined" && context;
}