How can I customize a permission request popup for push notifications in a browser?

放肆的年华 提交于 2019-12-22 08:23:06

问题


I see that some websites have a fancy push notification permission request popups like this one

whereas official API documentation doesn't provide any clue how to customize permission requests; and the only request I can generate looks like that

How can I create a less ugly popup?


回答1:


Click the Allow button on the House of Bots site and you'll see exactly how they do it--they don't.

The pop-up you see is just plain html, nothing special. When you click allow, it opens a new window that asks for permission, and then you get the typical browser window just like in your second image.



来源:https://stackoverflow.com/questions/46841500/how-can-i-customize-a-permission-request-popup-for-push-notifications-in-a-brows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!