From 4c95f67d4a2fe59d9e86832391c634054659150f Mon Sep 17 00:00:00 2001 From: Philip Walton Date: Tue, 2 Jul 2024 09:25:23 -0700 Subject: [PATCH] Remove pagehide from the README examples (#501) --- README.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/README.md b/README.md index 2da544b9..61e706d8 100644 --- a/README.md +++ b/README.md @@ -405,14 +405,9 @@ addEventListener('visibilitychange', () => { flushQueue(); } }); - -// NOTE: Safari does not reliably fire the `visibilitychange` event when the -// page is being unloaded. If Safari support is needed, you should also flush -// the queue in the `pagehide` event. -addEventListener('pagehide', flushQueue); ``` -_**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`._ +_**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`._