function doe(){ document.getElementsByTagName('columns')[0].style.display='table-caption'; setTimeout(doe2,20); } function doe2(){ document.getElementsByTagName('columns')[0].style.display='-moz-grid'; } function clickit() { var button = document.getElementById('button'); var evt = document.createEvent("MouseEvents"); evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); button.dispatchEvent(evt); setTimeout('clickit();', 20); } window.addEventListener('load', clickit, false); Clicking this should not crash Mozilla