javascript - 推送通知通知关闭事件在关闭通知后 10 - 20 分钟后触发,甚至永远不会触发
问题描述
我想在关闭推送通知后处理一些事情。该notificationclick
事件有效,但不用于 X 按钮或滑动通知。这就是我想使用notificationclose
事件的原因。问题是notificationclose
事件不会触发或在关闭消息后 10 到 20 分钟后触发,但仅在 Chrome 中触发。notificationclose
在 Firefox 中完美运行。我能做些什么?
self.addEventListener("notificationclose", function(event) {
console.log("Hello, world!");
});
解决方案
推荐阅读
- azure - 如何在运行时用天蓝色连接字符串覆盖本地连接字符串?
- excel - 表/范围的电源查询
- c# - XMLSerializer - UTF-8 与 UTF-16 代码的问题
- android - 莱特币的 BitcoinJ 问题。Litecoin 可以使用哪个依赖项?
- javascript - 使用threejs动态更新平面/立方体顶点 - 更新矩阵时出现问题
- angular-material-5 - 如何使用 Angular 材质创建卡片?
- java - 如何在 Spring-Boot 中创建 DefaultMessageListenerContainer?
- swift3 - Swift 3 - 遍历泛型集合
- python - 当我通过 pythonw.exe 运行 python 程序时获取用户输入
- node.js - MySQL8.0 xdevapi node.js 不返回键,只返回值