javascript Programming Glossary: node.text_node
Open a new Google Chrome tab and get the source http://stackoverflow.com/questions/10161044/open-a-new-google-chrome-tab-and-get-the-source case Node.ELEMENT_NODE html node.outerHTML break case Node.TEXT_NODE html node.nodeValue break case Node.CDATA_SECTION_NODE html..
Find all instances of 'old' in a webpage and replace each with 'new', using a javascript bookmarklet http://stackoverflow.com/questions/1175775/find-all-instances-of-old-in-a-webpage-and-replace-each-with-new-using-a-ja for var n 0 n nodes.length n if nodes n .nodeType Node.TEXT_NODE var r new RegExp a 'gi' nodes n .textContent nodes n .textContent.replace.. for var n 0 n nodes.length n if nodes n .nodeType Node.TEXT_NODE nodes n .textContent nodes n .textContent.replace new RegExp..
Replacing from javascript dom text node http://stackoverflow.com/questions/1495822/replacing-nbsp-from-javascript-dom-text-node the nodeValue of all child nodes where nodeType Node.TEXT_NODE. The resulting string sometimes contains a non breaking space..
javascript user selection highlighting http://stackoverflow.com/questions/304837/javascript-user-selection-highlighting s i dangerous.startOffset xs.setEndAfter s i .nodeType Node.TEXT_NODE s i s i .lastChild rs.push xs Ends basically the same code.. e i 1 else xe.setStartBefore e i .nodeType Node.TEXT_NODE e i e i .firstChild xe.setEnd e i dangerous.endOffset re.unshift..
find words in html page with javascript http://stackoverflow.com/questions/748309/find-words-in-html-page-with-javascript i switch curr.childNodes i .nodeType case Node.TEXT_NODE 3 if curr.childNodes i .textContent.match word console.log..
|