richtr / NoSleep.js

Prevent display sleep and enable wake lock in any Android or iOS web browser.
MIT License
2.19k stars 379 forks source link

Fix unhandled rejection error from visibility change events #158

Open joshkel opened 1 year ago

joshkel commented 1 year ago

This PR contains a:

Motivation / Use-Case

Visibility change events may cause unhandled rejection errors. This creates extra console noise and may trigger spurious errors in error-reporting services like Sentry.

Breaking Changes

None.

Additional Info

I believe that NoSleep.js should suppress any errors thrown from visibility change events, since there isn't anything that callers can do about them.