B2G/gecko/browser/devtools/webconsole/webconsole.js
/**
   * Scrolls a node so that it's visible in its containing XUL "scrollbox"
   * element.
   *
   * @param nsIDOMNode aNode
   *        The node to make visible.
   * @returns void
   */
Scrolls a node so that it's visible in its containing XUL "scrollbox"
element.

@param nsIDOMNode aNode
The node to make visible.
@returns void
Scrolls a node so that it ' s visible in its containing XUL " scrollbox " element . @param nsIDOMNode aNode The node to make visible . @returns void
function Utils_scrollToVisible(aNode)
  {
    if (!this.scroll) {
      return;
    }
    let richListBoxNode = aNode.parentNode;
    while (richListBoxNode.tagName != "richlistbox") {
      richListBoxNode = richListBoxNode.parentNode;
    }
    let boxObject = richListBoxNode.scrollBoxObject;
    let nsIScrollBoxObject = boxObject.QueryInterface(Ci.nsIScrollBoxObject);
    nsIScrollBoxObject.ensureElementIsVisible(aNode);
  }
function Utils_scrollToVisible ( aNode ) { if ( ! this . scroll ) { return ; } let richListBoxNode = aNode . parentNode ; while ( richListBoxNode . tagName != "richlistbox" ) { richListBoxNode = richListBoxNode . parentNode ; } let boxObject = richListBoxNode . scrollBoxObject ; let nsIScrollBoxObject = boxObject . QueryInterface ( Ci . nsIScrollBoxObject ) ; nsIScrollBoxObject . ensureElementIsVisible ( aNode ) ; }
Scrolls a node so that it's visible in its containing XUL "scrollbox"
 element.
Scrolls a node so that it ' s visible in its containing XUL " scrollbox " element .
// Find the enclosing richlistbox node. // Use the scroll box object interface to ensure the element is visible.