Reputation: 21
I'm trying to use Pushjs.org for quick fast notification system but for some reason Chrome keeps telling me that while using Push.Permission.request();
Permission for the Notification API may no longer be requested from a cross-origin iframe. You should consider requesting permission from a top-level frame or opening a new window instead
I'm not sure what this meant so I used the regular notification request using
Notification.requestPermission()
But it also returned the same thing. I tried doing some research and was unable to figure how what the right way of asking user for permission would be.
Upvotes: 2
Views: 1617
Reputation: 191
In newer versions of Chrome you cannot request the Notification API, unless the site is https
secured and also you cannot request it from a cross-origin iframe.
If you do meet this requirements, you should be able to use notifications and background push notifications on Chrome.
Upvotes: 1