JSFiddle - React, Tailwind, and code Playground
by sc0rp10
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><title>Яндекс</title><link rel="shortcut icon"href="http://yandex.st/morda-logo/i/favicon.ico"><link rel=alternate type="application/rss+xml"title="Новости Яндекса"href="http://company.yandex.ru/news/news.rss"><link rel=alternate type="application/rss+xml"title="Блог Яндекса"href="http://company.yandex.ru/blog/index.rss"><link rel=search href="http://yandex.ru/opensearch.xml"title="Яндекс"type="application/opensearchdescription+xml"><meta name="yamm"content="p"><script type="text/javascript">(function(f,b,g,a){b=f.documentElement;g="className";a="replace";b[g]+=" i-ua_js_yes "+(f.compatMode!="CSS1Compat"?"i-ua_css_quirks":"i-ua_css_standart")})(document);(function(d){var c=function(h,f,g,e){if(!h){return}if(h.addEventListener){h.addEventListener(f,g,e)}else{if(h.attachEvent){h.attachEvent("on"+f,g)}}};var a=function(g){var f=g.target||g.srcElement;if(!f){return}if(!f.tagName||f.tagName&&!(f.tagName.toLowerCase()=="input"||f.tagName.toLowerCase()=="textarea")){return}if(f.id&&f.id.toLowerCase()=="text"){d.isFocusStealed=0}else{d.isFocusStealed=1}};c(d,"focus",a,true);c(document,"focusin",a,true);c(document,"DOMFocusIn",a,true);var b=function(j){var i=j.target||j.srcElement,h=j.keyCode||j.which,g=String.fromCharCode(h),f=/[a-zA-Z0-9]/;if(!i||!i.tagName){d.isFocusStealed=1;return}if(!(i.tagName.toLowerCase()=="input"||i.tagName.toLowerCase()=="textarea")){return}if(i.id&&i.id.toLowerCase()=="text"){d.isFocusStealed=0;return}if(g&&g.match(f)){d.isFocusStealed=1}};c(document,"keyup",b);c(document,"keydown",b);c(document,"keypress",b)})(this);(Array.prototype.filter||(Array.prototype.filter=function(e){var d=[],c=arguments[1]||this;if(this===null){throw new Error("There is empty context for filter function")}if(typeof e!="function"){throw new Error("You should declare filter function as parameter")}for(var b=0,a=this.length;b<a;b++){var f=t[b];e.call(c,f,b,this)&&d.push(f)}return...
JavaScript
recurseDomChildren(document.documentElement);
function recurseDomChildren(start)
{
var nodes;
if(start.childNodes)
{
nodes = start.childNodes;
loopNodeChildren(nodes);
}
}
function loopNodeChildren(nodes)
{
var node;
for(var i=0;i<nodes.length;i++)
{
node = nodes[i];
if(node.nodeType === 8)
{
alert("text: " + node.textContent);
}
if(node.childNodes)
{
recurseDomChildren(node);
}
}
}