MCPcopy Index your code
hub / github.com/hoothin/UserScripts / getAllElements

Function getAllElements

Pagetual/pagetual.user.js:4582–4595  ·  view source on GitHub ↗
(sel, doc, contextNode)

Source from the content-addressed store, hash-verified

4580 }
4581
4582 function getAllElements(sel, doc, contextNode) {
4583 try {
4584 if (sel.indexOf(" =>> ") !== -1) {
4585 let result = getElement(sel, doc, contextNode);
4586 return result && [result];
4587 }
4588 if (!isXPath(sel)) {
4589 return doc.querySelectorAll(sel);
4590 }
4591 } catch(e) {
4592 debug(e, 'Error selector');
4593 }
4594 return getAllElementsByXpath(sel, contextNode, doc);
4595 }
4596
4597 function getElement(sel, doc, contextNode, bySort) {
4598 try {

Callers 9

replaceElementMethod · 0.85
refreshByClickMethod · 0.85
getPageElementMethod · 0.85
checkElementMethod · 0.85
querySelectorListMethod · 0.85
verifyNextMethod · 0.85
hookUrlMethod · 0.85
checkInputSelectorMethod · 0.85
waitForElementsFunction · 0.85

Calls 4

getElementFunction · 0.85
debugFunction · 0.85
getAllElementsByXpathFunction · 0.85
isXPathFunction · 0.70

Tested by

no test coverage detected