window blur/​focus/​pageshow/​visibilitychange tester by robocat

Detect foreground within iOS/UIWebView or Android/WebView: 1. click [restart], 2. open another tab or open another app or lock device or open another page. 3. Wait say 10 seconds. 4. Go back to page. Note that animationend event occurs - check milliseconds. webkitRequestAnimationFrame would cause performance issues.
seconds
tab
000.000s 000.000s start timeout #1 for 5s
000.001s 000.001s document.load capture
000.019s 000.019s monkey.animationstart
000.130s 000.130s document.load capture
000.134s 000.133s document.DOMContentLoaded capture
000.134s 000.134s document.DOMContentLoaded
000.136s 000.136s window.pageshow
000.136s 000.136s window.pageshow capture
Edit in JS Bin