I need to find out if the window has loaded or not.
I want to create a checkLoaded
function that will return true
or false
to indicate this, based on when I call it.
<html>
<head>
function checkLoaded(){
//alert true if window is loaded or alert false
}
</head>
<body onload="checkLoaded()"> <!-- This should alert true -->
Loding window.
<script>
checkLoaded();// this should alert false;
</script>
</body>
</html>
I don't want to use a global variable that I set when the window loads.
Is there any way that I can check the window
object's status, perhaps a property?
I don't want to use jQuery or any other external libraries.