window.addEventListener("load", yourFunction, true);Site compatibility for Firefox 3 / notebook
Site compatibility for Firefox 3
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
window.addEventListener("load", yourFunction, false);