Affecting Requesting notification permission and screen capture now requires user interaction

Published: | Categories: Audio & Video, DOM


Firefox had previously allowed to request push notification permission with no user interaction in the browser, but that kind of practice stopped working with Firefox 72 in an effort to prevent prompt spam. The Nightly and early Beta/DevEdition channels have already enabled the user interaction requirement since Firefox 68, and Firefox 71 shows a deprecation warning in the web console for such cases.

The Notification.requestPermission and PushManager.subscribe methods must always be called from inside a short running user-generated event handler, such as click or keydown.

The same policy applies to the MediaDevices.getDisplayMedia method that allows to capture the user’s computer screen as an image (screenshot) or video (screencast).