title: Detecting when an iframe gets or loses focus
body: <p>What's the correct way of detecting when an iframe gets or loses focus (i.e. will or will not receive keyboard events)? The following is not working in Fx4:</p>
  
  <pre><code>var iframe = /* my iframe */;
  iframe.addEventListener("focus", function() { /* never gets called */ }, false);
  </code></pre>