Faster DOM Access
Friday August 29, 2008
Unobtrusive JavaScript is less obvious if you access the elements as they load.
One of the biggest disadvantages that updating a web page via the DOM has is that the element on the page that you want to update must exist before you can update it. Most scripts solve this problem by waiting until the whole page has loaded before trying to update the page via the DOM. This simple alternative just checks over and over for if the particular element exists and will perform the update as soon as the necessary part of the page has loaded rather than waiting for the entire page.
Faster DOM Access


No comments yet. Leave a Comment