title: pagehide and pageshow events don't work as expected on ios chrome
body: <p>Apple documentation lists down the available iOS browser events here:
  <a href="https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html" rel="nofollow noreferrer">https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html</a></p>
  
  <p>The 'pagehide' and 'pageshow' events seem to work fine on safari, but on chrome it only works on page load and unload. It doesn't work on:</p>
  
  <ol>
  <li><p>Pressing the home button, i.e. sending Chrome to background</p></li>
  <li><p>Switching tabs</p></li>
  </ol>
  
  <p>Below is a small Javascript snippet that you can use to verify it:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          window.addEventListener("pageshow", function(evt){
              alert('show');
          }, false);
          window.addEventListener("pagehide", function(evt){
              alert('hide');
          }, false);
  &lt;/script&gt;
  </code></pre>
  
  <p>What can I do to detect whether chrome was sent to background or not. I need to clear a setTimeout timer as soon as chrome is brought back to foreground. Any workarounds?</p>