* 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
( context )
| 596 | * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value |
| 597 | */ |
| 598 | function testContext( context ) { |
| 599 | return context && typeof context.getElementsByTagName !== "undefined" && context; |
| 600 | } |
| 601 | |
| 602 | // Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors |
| 603 | var attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + |