This returns a loading state while the document is loading. You can try it by running this code and then reloading the page: For historical reasons, returning a non-empty string also counts as canceling the event. The window.onload function is widely supported by popular browsers. Can (a== 1 && a ==2 && a==3) ever evaluate to true? The notable exception is sending analytics. This is an easy-to-use tool that enables you to measure and test the speed of your web pages on both desktop and mobile devices. 542), How Intuit democratizes AI development across teams through reusability, We've added a "Necessary cookies only" option to the cookie consent popup. Heres a document with