blob: a54351e64d87332f7bd0fe79f5e83a77acaa7572 (
plain)
1
2
3
4
5
6
7
8
9
10
|
/**
* 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
*/
function testContext( context ) {
return context && typeof context.getElementsByTagName !== "undefined" && context;
}
export default testContext;
|