Thursday, January 04, 2007

Quick Tips - dojo.dom

When extracting text from a DOM node (HTML or XML), different browser have different method to do it. In IE node.text() while Firefox node.textContent().

Dojo provide a simple way to extract the text content.
dojo.dom.textContent(node)

So far I've tested it on IE and Firefox and it is working fine. I do not need to check for the browser myself. Try it out.

No comments: