Last active
January 30, 2017 10:48
-
-
Save emanoelqueiroz/ebd52665abb061b40e7fc2c0790f8b07 to your computer and use it in GitHub Desktop.
não acabado
This file contains hidden or 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
function findFirstLetter () { | |
let body = document.getElementsByTagName("body")[0]; | |
function childRun(ele) { | |
Object.keys(ele).forEach( | |
k => { | |
let childEle = ele[k]; | |
if (childEle.children.length > 1) | |
console.log(childEle.children); | |
else | |
childRun(childEle); | |
}); | |
} | |
childRun(body.children); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment