MCPcopy Create free account
hub / github.com/bugy/script-server / trimTextNodes

Function trimTextNodes

web-src/src/common/utils/common.js:677–683  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

675}
676
677export function trimTextNodes(el) {
678 for (let node of el.childNodes) {
679 if (node.nodeType === Node.TEXT_NODE) {
680 node.data = node.data.trim();
681 }
682 }
683}
684
685export function getElementsByTagNameRecursive(parent, tag) {
686 const tagLower = tag.toLowerCase();

Callers 1

common_test.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected