Why Am I Receiving Error `Push notification prompting can only be done from a user gesture` In Safar
function askForPermission() {
btn.addEventListener('click', function() {
const beamsClient = new PusherPushNotifications.Client({instanceId: instanceId});
beamsClient.start()
});
}const beamsClient = new PusherPushNotifications.Client({instanceId: instanceId});function askForPermission(){
btn.addEventListener('click', function() {
beamsClient.start()
} );
}Last updated