I got a recursive function which goes through all HTML Child Nodes.
Is there an easy way to check if the current element is an image with element.nodeType? So I could use DOM onto this element.
Here an example of the code:
`
replaceText(document.body)
function replaceText(element){
if(element.hasChildNodes()){
element.childNodes.forEach(replaceText)
} else if(element.nodeType === Text.TEXT_NODE){
//Do Something
}
`
Just like that but also for pictures and especially for the pictures alt attribute.