anchor.diff:              if(replInput) {
                   replInput.onkeydown = function(ev) {
                       if(ev.keyCode == 13) {
  +                        // reset the command up/down arrow offset.
  +                        previousCommandOffset = 0;
  +
                           var text = replInput.value;
  +
  +                        if(text != "" && text !== undefined) {
  +                            // push this command on to the previous commands list.
  +                            previousCommands.push(text);
  +                        }
  +
                           replInput.value = "";
                           apiCall("eval", { "index": index, source: text }, function(response) {
                               replPre.innerHTML += ">> " + response.highlighted_input + "\n";
  
positive.code:     };
      
      applicationFrames.click();
      
      for(var i = 0; i < frames.length; i++) {
          if(frames[i].attributes["data-context"].value == "application") {
              frames[i].click();
              break;
          }
      }
  })();
  </script>
  </html>
  
negative.code:                             }
                              replPre.scrollTop = replPre.scrollHeight;
                          });
                      }else if(ev.keyCode == 38) {
                          // the user pressed the up arrow.
                          populateCommandPrompt(replInput, previousCommandOffset - 1, -1);     
                      }else if(ev.keyCode == 40) {
                          // the user pressed the down arrow.
                          populateCommandPrompt(replInput, previousCommandOffset + 1, previousCommands.length);
                      }
                  };
              }
          })(i, frames[i], frameInfos[i]);
      }
      
      document.querySelector(".frames li:first-child").click();
      
      var applicationFrames = document.getElementById("application_frames");
      var allFrames = document.getElementById("all_frames");
  