title: How to tell if JS Windows8 metro app is visible or not
body: <p>I am trying to create an app which does some work when it becomes visible, and does other work when it goes away. This is typically accomplished with the page visibility api (http://css.dzone.com/articles/using-html5s-pagevisibility) but this is not currently supported in windows 8: <a href="http://msdn.microsoft.com/en-us/library/ie/hh673553(v=vs.85).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ie/hh673553(v=vs.85).aspx</a></p>
  
  <p>There are callbacks onactivated and oncheckpoint but these are for the process lifecycle and are not necessarily related to app visibility. Specifically, an app can go to the background for quite some time before it is suspended.</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>-- Henry</p>