<html> <head> <script> function boom() { var f = function() { document.documentElement.offsetHeight; }; window.addEventListener("DOMSubtreeModified", f, true); document.getElementsByTagName("table")[0].setAttribute("cellpadding", "2"); } </script> </head> <body onload="boom();"> <table><tr><td></td></tr></table> </body> </html>