Skip to content

Commit

Permalink
beforeunload event requires sticky activation (#32479)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pavl1 authored Feb 29, 2024
1 parent de19574 commit f568a3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/en-us/web/security/user_activation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()")}}
Expand Down Expand Up @@ -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)).
Expand Down

0 comments on commit f568a3d

Please sign in to comment.