B2G/gecko/browser/devtools/webconsole/webconsole.js
/**
   * Check if the caret is at a location that allows selecting the previous item
   * in history when the user presses the Up arrow key.
   *
   * @return boolean
   *         True if the caret is at a location that allows selecting the
   *         previous item in history when the user presses the Up arrow key,
   *         otherwise false.
   */
Check if the caret is at a location that allows selecting the previous item
in history when the user presses the Up arrow key.

@return boolean
True if the caret is at a location that allows selecting the
previous item in history when the user presses the Up arrow key,
otherwise false.
Check if the caret is at a location that allows selecting the previous item in history when the user presses the Up arrow key . @return boolean True if the caret is at a location that allows selecting the previous item in history when the user presses the Up arrow key otherwise false .
function JST_canCaretGoPrevious()
  {
    let node = this.inputNode;
    if (node.selectionStart != node.selectionEnd) {
      return false;
    }
    let multiline = /[\r\n]/.test(node.value);
    return node.selectionStart == 0 ? true :
           node.selectionStart == node.value.length && !multiline;
  }
function JST_canCaretGoPrevious ( ) { let node = this . inputNode ; if ( node . selectionStart != node . selectionEnd ) { return false ; } let multiline = / [\r\n] / . test ( node . value ) ; return node . selectionStart == 0 ? true : node . selectionStart == node . value . length && ! multiline ; }
Check if the caret is at a location that allows selecting the previous item
 in history when the user presses the Up arrow key.
Check if the caret is at a location that allows selecting the previous item in history when the user presses the Up arrow key .