Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
<div>Dupnt</div><div>Dupont</div>
</body>
</html>
 
function talksAbout(node, string) {
     node.parentNode.classList.remove("finded");//reset pour relance !
     if (node.nodeType == document.ELEMENT_NODE)
        Array.from( node.childNodes ).forEach( function( node ) {
          talksAbout( node, string  );
         });
     else if ( node.nodeType == document.TEXT_NODE )
        if( node.nodeValue.indexOf(string) > -1 )
           node.parentNode.classList.add("finded");
}
function eventKey(){
  talksAbout(document.querySelector("body"), "Dupont");
requestAnimationFrame(eventKey);
}
requestAnimationFrame(eventKey);
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
dupontpro
0viewers