Skip to content

Commit 4c95f67

Browse files
authored
Remove pagehide from the README examples (#501)
1 parent d6880fd commit 4c95f67

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -405,14 +405,9 @@ addEventListener('visibilitychange', () => {
405405
flushQueue();
406406
}
407407
});
408-
409-
// NOTE: Safari does not reliably fire the `visibilitychange` event when the
410-
// page is being unloaded. If Safari support is needed, you should also flush
411-
// the queue in the `pagehide` event.
412-
addEventListener('pagehide', flushQueue);
413408
```
414409

415-
_**Note:** see [the Page Lifecycle guide](https://developers.google.com/web/updates/2018/07/page-lifecycle-api#legacy-lifecycle-apis-to-avoid) for an explanation of why `visibilitychange` and `pagehide` are recommended over events like `beforeunload` and `unload`._
410+
_**Note:** see [the Page Lifecycle guide](https://developers.google.com/web/updates/2018/07/page-lifecycle-api#legacy-lifecycle-apis-to-avoid) for an explanation of why `visibilitychange` is recommended over events like `beforeunload` and `unload`._
416411

417412
<a name="bundle-versions"><a>
418413

0 commit comments

Comments
 (0)