example-d3/webworker.js
/** Returns the next node in a document-order depth-first search.
   * See the definition of document order[1]:
   *   1) element
   *   2) namespace nodes
   *   3) attributes
   *   4) children
   *   [1]: http://www.w3.org/TR/xpath/#dt-document-order
   */
Returns the next node in a document-order depth-first search.
Returns the next node in a document - order depth - first search .
function followingNode(node) {
    if (node.ownerElement)  
      node = node.ownerElement;
    if (null != node.firstChild)
      return node.firstChild;
    do {
      if (null != node.nextSibling) {
        return node.nextSibling;
      }
      node = node.parentNode;
    } while (node);
    return null;
  }
function followingNode ( node ) { if ( node . ownerElement ) node = node . ownerElement ; if ( null != node . firstChild ) return node . firstChild ; do { if ( null != node . nextSibling ) { return node . nextSibling ; } node = node . parentNode ; } while ( node ) ; return null ; }
Returns the next node in a document-order depth-first search.
Returns the next node in a document - order depth - first search .
// attributes: following node of element.