Created
August 26, 2014 07:45
-
-
Save binjo/fa48baff20e62563a696 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<script> | |
function t() | |
{ | |
var s="\n"; | |
var elements=new Array("a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","big","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","dir","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","layer","legend","li","link","listing","main","map","mark","marquee","menu","meta","meter","nav","nobr","noembed","noframes","nolayer","noscript","object","ol","optgroup","option","output","p","param","plaintext","pre","progress","q","rp","ruby","rt","s","samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","title","tr","track","tt","u","ul","var","video","wbr","xmp"); | |
var aaa; | |
var functions=""; | |
var attributes=""; | |
var events=""; | |
var readonlys=""; | |
var unknowns=""; | |
for(i=0;i<elements.length;i++) | |
{ | |
functions=""; | |
attributes=""; | |
events=""; | |
readonlys=""; | |
unknowns=""; | |
aaa=document.createElement(elements[i]); | |
for(var x in aaa) | |
{ | |
if(typeof aaa[x] == "function") | |
{ | |
functions+="\""; | |
functions+=x; | |
functions+="\","; | |
}else if(typeof aaa[x] == "string" || typeof aaa[x] == "number" || typeof aaa[x] == "boolean") | |
{ | |
try | |
{ | |
aaa[x]=aaa[x]; | |
attributes+="\""; | |
attributes+=x; | |
attributes+="\","; | |
}catch(e) | |
{ | |
readonlys+="\""; | |
readonlys+=x; | |
readonlys+="\","; | |
} | |
} | |
else if(x[0]=='o' && x[1] =='n') | |
{ | |
events+="\""; | |
events+=x; | |
events+="\","; | |
} | |
else | |
{ | |
unknowns+="\""; | |
unknowns+=x; | |
unknowns+="\","; | |
} | |
} | |
s+="char*"+elements[i]+"Attributes[]={"+attributes+"};\r\n"; | |
s+="char*"+elements[i]+"Functions[]={"+functions+"};\r\n"; | |
s+="char*"+elements[i]+"Events[]={"+events+"};\r\n"; | |
s+="char*"+elements[i]+"Readonlys[]={"+readonlys+"};\r\n"; | |
s+="char*"+elements[i]+"Unknowns[]={"+unknowns+"};\r\n"; | |
} | |
document.body.innerText+=s; | |
} | |
</script> | |
<body onload=t()> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment