Created
April 10, 2018 03:45
-
-
Save cfsilence/f2ca0accc5b419a8f3e7354c1fa7ad86 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// page visibility API | |
// see: https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API | |
window.addEventListener('webkitvisibilitychange', (e) => { | |
this.showDesktopNotification = document['webkitHidden']; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment