jasonzissman / TimeMe.js

A JavaScript library to accurately time how long a user views a web page, disregarding idle time and time when the tab or window is minimized.
MIT License
592 stars 124 forks source link

doc is not defined #36

Closed thomasdavis closed 7 years ago

thomasdavis commented 7 years ago

You can view the error here

https://my.trackjs.com/shared/NmI1YThiYzcxYzM3NDIwMzk0NWY2YjJkMTUxMDNjMjk#telemetry

Click on Stack Trace for more information

2wsx commented 7 years ago

This moment I got the same error and found this comment here, already. The bug is in line 290 in timeme.js } else if (typeof doc.mozHidden !== "undefined") { I think it must be: } else if (typeof document.mozHidden !== "undefined") {

jasonzissman commented 7 years ago

Good catch, and very sorry for the late response. This has been fixed.