I am trying to simulate a script that takes a long time to run on page load.
I tried this:
window.onload = function() {
  setTimeout(alert("Page Rendered"), 200000);
};
But alert message happens instantly.
What am I doing wrong?
I am trying to simulate a script that takes a long time to run on page load.
I tried this:
window.onload = function() {
  setTimeout(alert("Page Rendered"), 200000);
};
But alert message happens instantly.
What am I doing wrong?
 
    
    Check the function(). docs
window.onload = function() {
  setTimeout(function(){alert("Page Rendered")}, 200000);
};
