()
| 111 | // parked in the back-forward cache keeps its clocks, and an open stretch |
| 112 | // would count the whole time away as seen when it is restored. |
| 113 | const onPageHide = () => { |
| 114 | stopTimer(); |
| 115 | report(); |
| 116 | visibleSince = undefined; |
| 117 | }; |
| 118 | |
| 119 | observer.observe(element); |
| 120 | globalThis.document.addEventListener('visibilitychange', evaluate); |