Can I directly set browser notification to allow?
Shubham Kumar

Shubham Kumar @shubham2270

About: Frontend Developer | React.js | JavaScript 😎

Joined:
Oct 19, 2018

Can I directly set browser notification to allow?

Publish Date: Mar 17 '20
2 2

Is it possible to directly set the notification to allow instead of using Notification.requestPermission() which prompts the user to Allow or block?

Comments 2 total

  • LokiDev
    LokiDevMar 17, 2020

    Nope. And that's exactly how it should be.

  • Brandin Chiu
    Brandin ChiuMar 17, 2020

    No, and we should all be glad that we can't. It would be an absolute adware nightmare if sites could just bury themselves directly into desktop notifications.

    This is why alert() is blocked by browsers in most cases now

Add comment