title: JavaScript keydown error in IE
body: <pre><code>&lt;script&gt;
  var personX = 18;
  var personY = 13;
  
  function processArrowKeys(E) {
      if (E.keyCode == 37 || E.keyCode == 38 || E.keyCode == 39 || E.keyCode==40) {
          E.preventDefault();
      }
  
      if (E.keyCode == 37) {
          if (currentterrain[personX - 1][personY] == 0 || currentterrain[personX - 1][personY] == 1 || currentterrain[personX - 1][personY] == 3) {
              personX--;
          }
      }
      if (E.keyCode == 39) {
          if (currentterrain[personX + 1][personY] == 0 || currentterrain[personX + 1][personY] == 1 || currentterrain[personX + 1][personY] == 3) {
              personX++;
          }
      }
      if (E.keyCode == 38) {
          for (i = 0; i &lt; 3; i++) {
              if (currentterrain[personX][personY - 1] == 0 || currentterrain[personX][personY - 1] == 1 || currentterrain[personX][personY - 1] == 3) {
                  personY--;
              }
          }
      }
  }
  &lt;/script&gt;
  
  &lt;body onkeydown="processArrowKeys(event)"&gt;
  </code></pre>
  
  <p>The IE debugger says that it expects an object and brakes on "handleArrowKeys(event)".</p>
  
  <p>This works in FF and Chrome</p>
  
  <p>I don't know why this fails, but it does.</p>