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

      var cursor = this.cursor_;
      var prevSibling = this.c; // previous sibling
      var prevChild = this.d;   // previous child

      do
      {
        var node = cursor ? cursor[prevSibling] : this.root_[prevChild];
        if (node)
        {
          while (node[prevChild])
            node = node[prevChild];
          cursor = node;
        }
        else
          if (cursor)
            cursor = cursor[PARENT_NODE];

        if (!cursor || cursor === this.root_)
        {
          cursor = null;
          break;
        }
      }
      while (!filter(cursor));

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

      var cursor = this.cursor_;
      var prevSibling = this.c; // previous sibling
      var prevChild = this.d;   // previous child

      do
      {
        var node = cursor ? cursor[prevSibling] : this.root_[prevChild];
        if (node)
        {
          while (node[prevChild])
            node = node[prevChild];
          cursor = node;
        }
        else
          if (cursor)
            cursor = cursor[PARENT_NODE];

        if (!cursor || cursor === this.root_)
        {
          cursor = null;
          break;
        }
      }
      while (!filter(cursor));

      return this.cursor_ = cursor;
    }
function ( filter ) { filter = filter || this . filter ; var cursor = this . cursor_ ; var prevSibling = this . c ; // previous sibling var prevChild = this . d ; // previous child do { var node = cursor ? cursor [ prevSibling ] : this . root_ [ prevChild ] ; if ( node ) { while ( node [ prevChild ] ) node = node [ prevChild ] ; cursor = node ; } else if ( cursor ) cursor = cursor [ PARENT_NODE ] ; if ( ! cursor || cursor === this . root_ ) { cursor = null ; break ; } } while ( ! filter ( cursor ) ) ; return this . cursor_ = cursor ; }
Returns previous node from cursor.
@param {function(object):boolean} filter Override internal filter
@return {Node|object}
Returns previous node from cursor .