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

Function getTextNode

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

Source from the content-addressed store, hash-verified

350}
351
352function getTextNode(el, match) {
353 const walk = document.createTreeWalker(el, NodeFilter.SHOW_TEXT, null, false);
354 if (!match) {
355 return walk.nextNode();
356 }
357
358 let node;
359 while ((node = walk.nextNode())) {
360 if (node.wholeText.includes(match)) {
361 return node;
362 }
363 }
364}
365
366function setBaseAndExtent(...args) {
367 const document = args[0].ownerDocument;

Callers 1

commands.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected