This should not crash Mozilla function doe(){ document.getElementsByTagName('html:object')[0].removeAttribute('style'); document.getElementsByTagName('html:object')[0].offsetHeight; document.getElementsByTagName('html:span')[1].removeAttribute('style'); document.getElementsByTagName('html:object')[0].setAttribute('style', 'text-decoration: underline'); document.documentElement.removeAttribute("class"); } setTimeout(doe,50);