With jQuery, we all know the wonderful .ready() function:
$('document').ready(function(){});
However, suppose I want to execute a function written in normal JavaScript with no library support, and I want to launch it as soon as the website is ready to handle it.
What is the right strategy here? I know what I'm capable of:
window.onload="myFunction()";
Or I can use the body tag:
<body onload="myFunction()">
Or I can even try at the bottom of the page after everything, but the end body or Html tag like:
<script type="text/javascript">
myFunction();
</script>
What is a cross-browser(old/new) technique of issuing one or more functions in the same way as jQuery's $.ready() does?