src/basis/dom.js
function(filter){
      filter = filter || this.filter;

      var cursor = this.cursor_ || this.root_;

      do
      {
        var node = cursor[this.a]; // next child
        while (!node)
        {
          if (cursor === this.root_)
            return this.cursor_ = null;

          node = cursor[this.b]; // next sibling

          if (!node)
            cursor = cursor[PARENT_NODE];
        }
      }
      while (!filter(cursor = node));

      return this.cursor_ = cursor;
    }
function(filter){
      filter = filter || this.filter;

      var cursor = this.cursor_ || this.root_;

      do
      {
        var node = cursor[this.a]; // next child
        while (!node)
        {
          if (cursor === this.root_)
            return this.cursor_ = null;

          node = cursor[this.b]; // next sibling

          if (!node)
            cursor = cursor[PARENT_NODE];
        }
      }
      while (!filter(cursor = node));

      return this.cursor_ = cursor;
    }
function ( filter ) { filter = filter || this . filter ; var cursor = this . cursor_ || this . root_ ; do { var node = cursor [ this . a ] ; // next child while ( ! node ) { if ( cursor === this . root_ ) return this . cursor_ = null ; node = cursor [ this . b ] ; // next sibling if ( ! node ) cursor = cursor [ PARENT_NODE ] ; } } while ( ! filter ( cursor = node ) ) ; return this . cursor_ = cursor ; }
Returns next node from cursor.
@param {function(object):boolean} filter Override internal filter
@return {Node|object}
Returns next node from cursor .