title: window.frames[0].document.onkeydown not working in Firefox
body: <p>I have this line not working in Firefox (works perfectly fine in IE and Chrome)</p>
  
  <pre><code>ste.frame.document.onkeydown=function(e) {
      alert('a');
  };
  </code></pre>
  
  <p>here ste.frame is a window object [object Window]. I tried </p>
  
  <pre><code>window.frames[0].document.onkeydown=function(e){
      alert('b');
  }
  </code></pre>
  
  <p>Also working in IE and Chrome and not working in Firefox. I guess if the second one works, the first one will work either. </p>
  
  <p>Does anyone know how to resolve this?
  Thanks in advance.</p>