Check if hidden is available first #2656

Merged
merged 1 commit into from Jul 23, 2016

Projects

None yet

2 participants

@leopoldobrines7
Contributor

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.

@photonstorm
Owner

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
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment