Re:Don't wait for "DOM ready" for your app to start
by barclay on Friday June 08, 2012 @07:50PM
(#4086678)
> better to solve that problem than piss around with a half built page in my experience.
Seconded. This can cause far more bugs and timing problems than it's worth. Find out what's taking so long to fire, and fix (or defer) that.
Re:Don't wait for "DOM ready" for your app to start
by mkmcdonald on Friday June 08, 2012 @08:35PM
(#4086779)
> [on placing a script before the end tag of the body element] what's the point [...]? Neither much better than just waiting for dom loaded.
I'll take sane, library-agnostic script without event listeners for $500, Alex.
Re:Don't wait for "DOM ready" for your app to start
by kevingadd on Friday June 08, 2012 @08:31PM
(#4086775)
Yeah, whether or not you can run stuff before DOM ready is often one of those questions where most answers are right 99% of the time and piss off your customers the other 1% of the time. Have fun debugging your little optimization when you literally can't reproduce the bug in your own debugging environment.
If it is taking a while to fire, better to solve that problem than piss around with a half built page in my experience. I experimented at one point with js enhancing controls just after they were declared, it's honestly not worth the effort. He'll learn.
This smacks of the bootstrap semi-colon nonsense, we all tried semi-colonless once, it ends up a nightmare, but some mistakes the next generation need to figure out themselves.