Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Set a listener that sets a property or variable. If it's set, the event has been dispatched. Of course you might be in a browser that doesn't support the event, in which case it will never occur. Commented Feb 26, 2012 at 22:42
  • @RobG I already had the answer for the browsers the ado not support DOMContentLoaded. For those, I use the load event and the onload event. I still don't have the answer for the question I made Commented Feb 27, 2012 at 6:22
  • There is no "onload" event, there is an onload attribute/property for setting listeners for the load event. If you want to know unequivocally if DOMContentLoaded has occurred, set a listener and see if it's been called. Commented Feb 27, 2012 at 12:01