Check if hidden is available first #2656

merged 1 commit into from Jul 23, 2016


None yet

2 participants


This PR changes

  • Nothing, it's a bug fix

Check if 'document.hidden' is available first, and if it is then never even check for the prefix version. That will stop the warning (like "mozHidden and mozVisibilityState are deprecated") in newer versions of browsers and retain backward compatibility.


Awesome, thanks.

@photonstorm photonstorm merged commit 02d0785 into photonstorm:dev Jul 23, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment