When is it Safe to Modify the DOM?
This is a pretty important question when in comes to DOM programming. Start manipulating the DOM to early and bad things happen. Do it too late and the users may see that annoying flicker. So what's the best technique for figuring this out? Well, I was curious about this myself so I took a look at how some of the popular Ajax libraries (jQuery, MooTools, YUI, Prototype and ASP.NET AJAX) are doing this. Here is what I found out ... Update: 08/11/2008: I came across an article that sheds more light on ASP.NET AJAX's init technique. There is a lot of good content in the comments as well (look for the ones left by Dave Reed). Here are a few snippets of what Dave has to say ... His comments with respect to the location of where the ScriptManager injects the call to Application.initialize ... ScriptManager does not put...