Whitespace in the DOM

Moved from DOM:element.firstChild, doesn't really belong there. --Nickolay 16:09, 19 June 2006 (PDT)


More about the phantom nodes issue read at bug 26179 (do not comment in that bug!). One may format his code as shown below to work around the problem:

<!-- Conventional pretty-print currently
     leading to DOM Tree pollution in Gecko:
  <li>Position 1</li>
  <li>Position 2</li>
  <li>Position 3</li>

<!-- Pretty-print adjusted to the
     phantom nodes issue:
  ><li>Position 1</li
  ><li>Position 2</li
  ><li>Position 3</li

I have moved the pretty-print workaround back to http://developer.mozilla.org/en/docs...ace_in_the_DOM Thinking back, I see no reason why http://developer.mozilla.org/en/docs..._things_easier would be suitable for Javascript-based tree walker description but not for the common pretty print workaround. They are both solving the same problem and "making things easier".

Document Tags and Contributors

 Contributors to this page: VK, Nickolay
 Last updated by: VK,