Just a heads up.

Jonathan Snook said on August 30, 2006

Sometimes those characters are a result of the fact that my host keeps feeding files out as iso-8859 where they should be UTF-8 (which will be fixed when I roll out a new backend).

I didn't escape one of the characters which hopefully explains some rendering issues.

Olivier Mengué said on September 12, 2006

Caching functions of the DOM is a very bad idea as it depends on the browser implementation, so portability is low.

What must be cached is DOM data objects:

function IterateWorkOverCollection()
{
      var target = document.getElementById("target");
      var length = myCollection.getItemCount();

      for(var index = 0; index<length; index++)
      {
            target.appendChild(myCollection[index]);
      }
}

I wonder also about the performance of nextSibling instead of accessing to an element by index.

Gabe said on June 19, 2007

Olivier Mengu

Caching functions of the DOM is a very bad idea as it depends on the browser implementation, so portability is low.

Very true, "caching" the DOM objects rather then the Objects methods is also a modular approach. If you wanted to use multiple methods/properties of the DOM object, they are a single method/property away. Caching a method limits you to just the use of that single reference.

Sorry, comments are closed for this post. If you have any further questions or comments, feel free to send them to me directly.
f2富二代官网入口