Created
March 9, 2020 20:27
-
-
Save opensourcekam/95e8d86d485145359f33358a60da616a to your computer and use it in GitHub Desktop.
This file contains 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
export const on = (obj: any, ...args: any[]) => obj.addEventListener(...args); | |
export const off = (obj: any, ...args: any[]) => obj.removeEventListener(...args); |
This file contains 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
import {on, off} from './eventListernersUtil'; | |
// on(document, 'visibilitychange', onVisibility); | |
// off(document, 'visibilitychange', onVisibility); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment