MCPcopy Create free account
hub / github.com/decaporg/decap-cms / getTextNode

Function getTextNode

cypress/support/commands.js:382–394  ·  view source on GitHub ↗
(el, match)

Source from the content-addressed store, hash-verified

380}
381
382function getTextNode(el, match) {
383 const walk = document.createTreeWalker(el, NodeFilter.SHOW_TEXT, null, false);
384 if (!match) {
385 return walk.nextNode();
386 }
387
388 let node;
389 while ((node = walk.nextNode())) {
390 if (node.wholeText.includes(match)) {
391 return node;
392 }
393 }
394}
395
396function setBaseAndExtent(...args) {
397 const document = args[0].ownerDocument;

Callers 1

commands.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected