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*

6
  • 2
    This is not correct. DOMContentLoaded is fired only after interactive (proof here: jsfiddle.net/luciopaiva/grs82byv/20) Commented Dec 6, 2019 at 20:51
  • @LucioPaiva thanks and you're right - but it only mean that the comment about DCL already fired is incorrect. the code still works perfectly in all cases, so why -1? Commented Dec 8, 2019 at 8:39
  • 1
    You are right, I was misguided by the comment there. I edited your answer fixing it and adding a bit more info; please let me know what you think. Commented Dec 8, 2019 at 11:56
  • 1
    “A more readable regexp would be […]” → Given the choice, you should always prefer the more readable version of the same code. Commented Jan 27, 2020 at 13:26
  • @DenilsonSáMaia i agree. changed it. Commented Jan 29, 2020 at 14:25