Musing with Element Traversal

Yesterday, W3C announced Element Traversal Specification Is a W3C Recommendation. This will help Web developers forgetting about those vexatious nodes that one has to go around when navigating the DOM. DOM Traversal is along the same lines but I guess it didn’t make the 80/20 rule for the implementers.

Unfortunately, our days of vexation aren’t over yet.

First, the Element Traversal specification isn’t supported in the latest final product versions of Firefox or Internet Explorer for example. I didn’t check with Safari but Opera does support it. Some of those, if not all, will support the specification in their product releases of 2009.

Second, as we all know, users take time to upgrade to the latest versions of Web browsers, so the Web developers won’t get to enjoy the specification out of the box on the Web for sometimes.

So, should we forget about using Element Traversal? Well, no, not quite. Given the simplicity of the functions, you can easily write a work around. I developed et.js, Element Traversal for everyone while musing today around the future of ECMAScript. You don’t get to enjoy the low implementation footprint of Element Traversal but it works at least. I didn’t test it in all browsers but the page contains a self-test. If it doesn’t work for you, let me know.

Joyeux Noël.

One thought on “Musing with Element Traversal

Comments are closed.