Javascript document node iterator.