Which is more widely supported: window.onload or document.onload?
window.onload
document.onload
Add Event Listener
Update March 2017
window.addEventListener('load', function() { console.log('All assets are loaded') })
$(window).on('load', function() { console.log('All assets are loaded') })