Every line of 'document body innertext' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
5 function innerText(el) { 6 7 if (el.nodeType === 3) return el.nodeValue; 8 9 let str = ''; 10 [ ...el.childNodes ].forEach(c => str += innerText(c)); 11 12 return str; 13 }
17 function getInnerText(node) { 18 return node.innerText; 19 }
53 set textContent(body: string) { 54 const txt = new HDOMNode(TEXT); 55 txt.body = body; 56 this._children = [txt]; 57 this.children = []; 58 }
16 export function getTextContent(fixture) { 17 return fixture.debugElement.nativeElement.textContent; 18 }
142 getTextContent() { 143 return this.el.textContent 144 }