JamesMGreene / jWalker

A well-tested cross-browser JavaScript implementation of the TreeWalker class defined in the W3C specification for DOM Traversal (DOM Level 2).
http://jamesmgreene.github.com/jWalker/
MIT License
2 stars 1 forks source link

jWalker

Build Status

jWalker provides a well-tested, cross-browser JavaScript implementation of the TreeWalker class defined in the W3C specification for DOM Traversal (DOM Level 2).

This bridges the gap left by Internet Explorer browsers less than IE9 (as well as IE9 when used in IE7/IE8 compatibility mode) when trying to use TreeWalkers. It also addresses a WebKit bug that I reported that has since been resolved but still exists in older versions of WebKit browsers (e.g. Safari, Chrome). Unfortunately, the same issue also exists in IE9 but has not yet been fixed.

Initially, I sought to also provide a well-tested, cross-browser JavaScript implementation of the NodeIterator class defined in the W3C specification for DOM Traversal (DOM Level 2) as well. However, upon further review, I discovered that the NodeIterator could not be implemented 100% accurately in JavaScript due to its robustness requirements, which would require intimate browser-level knowledge of any updates made to the live DOM.