Friday, August 25th, 2006

DOMContentLoaded Gains Traction; Now in Dojo

Category: Dojo

The startup time of Dojo has improved, and it it due to DOMContentLoaded now being the onload event.

This last weekend I finally implemented Dean Edwards’ DOMContentLoaded (with Matthias Miller and John Resig) solution for the dojo.addOnLoad event, as opposed to using the window.onload event to fire all initialization…and so far (with the exception of some minor side effects, notably with widgets that use images for layout) it is working very well–and the bottleneck of initial load performance (you know, where the page seems to take forever to load) has been markedly improved.

It’s almost like night and day, in some respects.

Posted by Dion Almaer at 11:22 am

3.9 rating from 32 votes


Comments feed TrackBack URI

This feature is also included in the Unobtrusive JavaScript plugin for Rails that you blogged about earlier in the week. JQuery also uses this technique.

Comment by Dean Edwards — August 25, 2006

wohoow, taken from jQuery :)

Comment by Gilles — August 26, 2006

Leave a comment

You must be logged in to post a comment.