Closed bpierre closed 11 years ago
Awesome! Do you know if this may cause some scripts to not work right anymore?
Only if the script relies on fully loaded ressources, e.g. get the dimensions of an image without width
and height
attributes, and did’nt already use a "window load" event.
Most of the time, developers only need to get CSS dimensions, positions etc., which are present on document ready, so I guess 99% of the existing scripts won’t be affected.
Landed 9f3361f85b758c4a0874b318fcfad79fda89f17d
Thanks!
I submitted a new version with this patch to AMO! Awaiting review now... Thanks!
Cool :-)
Huge speed improvement :-)
In most cases, the document ready event is what a developer want. If necessary, it’s easy to use
window.addEventListener('load', …)
to listen for the window onload event.