Are there any real advantages to using window.onload=function(){}; over onload=function(){}; ? I know window.onload looks more proper, but that's not a good reason for me to choose it, especially that it's longer/slower than onload.
After some time-consuming searches and tests, those 2 were the only 2 browser compatible methods, the tests (on relatively new Chrome/Firefox versions, and IE from 5.5 to 9) included:
window.onload // works in all tested browsers
onload // works in all tested browsers, faster than window.onload …Run Code Online (Sandbox Code Playgroud)