title: Event for when user switches browser tabs
body: <p>I'm looking for an event which will fire whenever the user switches away from the page to another tab, and another event which fires when the user switches back to the tab again.</p>
  
  <p><code>window.onblur</code> and <code>window.onfocus</code> <a href="http://www.quirksmode.org/dom/events/index.html" rel="noreferrer">don't seem to work correctly</a> across all browsers</p>
  
  <p>Is there a proxy I could look at in order to synthesize this event?</p>