From f568a3d3b0d6be07e8e6386364a9a53b05fe7512 Mon Sep 17 00:00:00 2001 From: Sergey Pavlenko Date: Fri, 1 Mar 2024 02:19:09 +0800 Subject: [PATCH] beforeunload event requires sticky activation (#32479) The beforeunload event requires Sticky activation, not Transient activation. https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event#usage_notes notes the same --- files/en-us/web/security/user_activation/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/security/user_activation/index.md b/files/en-us/web/security/user_activation/index.md index 4170be0ad79dbaf..8588b3cbdc19143 100644 --- a/files/en-us/web/security/user_activation/index.md +++ b/files/en-us/web/security/user_activation/index.md @@ -28,7 +28,6 @@ If an activation has been triggered, the user agent differentiates between two t APIs that require transient activation (list is not exhaustive): -- {{domxref("Window/beforeunload_event", "beforeunload")}} event - {{domxref("Clients.openWindow()")}} - {{domxref("Clipboard.read()")}} - {{domxref("Clipboard.readText()")}} @@ -73,6 +72,7 @@ APIs that require transient activation (list is not exhaustive): APIs that require sticky activation (not exhaustive): +- {{domxref("Window/beforeunload_event", "beforeunload")}} event - {{domxref("Navigator.vibrate()")}} - {{domxref("VirtualKeyboard.show()")}} - Autoplay of [Media and Web Audio APIs](/en-US/docs/Web/Media/Autoplay_guide) (in particular for [`AudioContexts`](/en-US/docs/Web/API/AudioContext)).