Wondering why I can\'t get document.getElementById(\"my_div\").innerHTML to update the DOM when I re-assign the variable. For example:
document.getElementById(\"my_div\").innerHTML
you need to reassign the element after setting innerHTML/outerHTML:
let indexInParent=[].slice.call(elem.parentElement.children).indexOf(elem); elem.innerHTML=innerHTML; elem=elem.parentElement.children[indexInParent];