vendor/static/jquery/src/selector/testContext.js
raw| 1 | /** |
| 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 |
| 5 | */ |
| 6 | export function testContext( context ) { |
| 7 | return context && typeof context.getElementsByTagName !== "undefined" && context; |
| 8 | } |