Skip to content

Commit

Permalink
Merge pull request #68 from GoogleChrome/remove-unload
Browse files Browse the repository at this point in the history
Remove the unload listener
  • Loading branch information
philipwalton authored Jul 24, 2020
2 parents 59fcf4b + c7c72ed commit 7b88555
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/onHidden.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ const onPageHide = (event: PageTransitionEvent) => {
const addListeners = () => {
addEventListener('pagehide', onPageHide);

// Unload is needed to fix this bug:
// `beforeunload` is needed to fix this bug:
// https://bugs.chromium.org/p/chromium/issues/detail?id=987409
// eslint-disable-next-line @typescript-eslint/no-empty-function
addEventListener('unload', () => {});
addEventListener('beforeunload', () => {});
}

export const onHidden = (cb: OnHiddenCallback, once = false) => {
Expand Down

0 comments on commit 7b88555

Please sign in to comment.