(selector, contextNode = undefined, doc = document)
| 2374 | return result; |
| 2375 | } |
| 2376 | function getOne(selector, contextNode = undefined, doc = document) { |
| 2377 | if (!selector) return; |
| 2378 | contextNode = contextNode || doc; |
| 2379 | if (selector.slice(0,1) === '/' || selector.slice(0,2) === './' || selector.slice(0,2) === '(/' || selector.slice(0,3) === 'id(') { |
| 2380 | return getXpath(selector, contextNode, doc); |
| 2381 | } else { |
| 2382 | return getCSS(selector, contextNode); |
| 2383 | } |
| 2384 | } |
| 2385 | function getAll(selector, contextNode = undefined, doc = document) { |
| 2386 | if (!selector) return []; |
| 2387 | contextNode = contextNode || doc; |
no test coverage detected