Closed GoogleCodeExporter closed 8 years ago
What do you use it for? If you want to make sure your scripts don't run until
the DOM is fully loaded, wrapping your scripts in:
(function() {
// here
})();
is more effective.
In either case, I'm considering just moving all injected scripts to the end of
the body. Having both head and body JS didn't make much sense.
Original comment by anst...@gmail.com
on 4 Feb 2013 at 4:59
Actually, I have nothing that can not be adapted.
I just wanted you to know that it was just silly.
For many users can better visualize scripts separately from the head and body.
But you do not see this as a requirement, feel free to close the issue.
Original comment by thi...@thiagomt.com
on 4 Feb 2013 at 5:16
Fair enough. In terms of organization it would make sense to put helper
functions in the head and initialization JS in the body. However, in practice,
initialization stuff should use the self-executing closure above and all
scripts should be together at the end of the body to avoid spinning up the JS
engine while the DOM is still being built.
In the case of minimalist, it's a data compression and UI issue. It's simpler
to have just a single field and it makes the data a bit smaller (this
contributed to my ability to add sync in the last version.)
Hope it isn't too much trouble!
Original comment by anst...@gmail.com
on 4 Feb 2013 at 5:31
Original issue reported on code.google.com by
thi...@thiagomt.com
on 4 Feb 2013 at 4:54