you don't need this.

just send the event "visibilitychange" using `window.dispatchEvent` after calling `init`.