Is there a flag that is automatically set after window.onload such as window.isLoaded or window.loaded or window.isDOMContentLoaded? (no jQuery)
            Asked
            
        
        
            Active
            
        
            Viewed 82 times
        
    2
            
            
         
    
    
        Ludovic C
        
- 2,855
- 20
- 40
- 
                    1Not that I've ever seen, but there's nothing stopping you from creating just such a thing if you need it. – David Hoelzer Dec 23 '15 at 03:29
- 
                    1One such reference: http://stackoverflow.com/questions/11528132/determining-whether-the-window-has-loaded-without-using-any-global-variables – Sudipta Kumar Maiti Dec 23 '15 at 03:32
- 
                    no jquery????? https://i.stack.imgur.com/Bzawb.gif – markasoftware Dec 23 '15 at 03:32
- 
                    `isDOMContentLoaded`, so which do you want? When the `window` is loaded, or when the DOM is loaded? – Dec 23 '15 at 03:32
- 
                    @Markasoftware hehe no jQuery, but I love it :) – Ludovic C Dec 23 '15 at 03:34
- 
                    @squint Do I have a choice? If both exist well I'm happy to know both :) – Ludovic C Dec 23 '15 at 03:35
1 Answers
4
            
            
        document.readyState
if (document.readyState === "complete") would be the condition to check.
Found this here: Javascript - How to detect if document has loaded (IE 7/Firefox 3)
 
    