【问题标题】:replace Notificaion.requestPermission() dialog with html dialog用 html 对话框替换 Notification.request Permission() 对话框
【发布时间】:2018-01-26 21:28:19
【问题描述】:

我需要向用户请求权限才能发送通知,所以我使用此代码

Notification.requestPermission().then(...).catch(...);

这将显示此对话框

但我想用一个来自 html 的对话框替换这个对话框,像这样的对话框

我搜索了很多次,但没有找到任何可以帮助我的东西。

【问题讨论】:

    标签: javascript html browser permissions notifications


    【解决方案1】:

    出于安全原因,您不能想象有人创建了一个自定义 html 对话框,其中显示 BlockAllow 按钮,但两者都像 Allow

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-04-17
      • 1970-01-01
      • 1970-01-01
      • 2012-06-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多