gpt4 book ai didi

push-notification - 删除网络推送通知

转载 作者:行者123 更新时间:2023-12-02 02:55:48 26 4
gpt4 key购买 nike

有没有办法在显示后删除 Web 推送通知?要将其从设备上的通知列表中删除 - 还是将其标记为“已读”?

我认为这不能从服务器完成,我一直在寻找 Javascript API - 但我什么也没找到。

(我试图解决的更广泛的问题是如何在多个屏幕/浏览器/设备上同步通知。)

最佳答案

我想可能是不可能的。您可以显示和隐藏通知。这可以作为默认浏览器操作的解决方法,如 here 所述

Chrome will only show the "This site has been updated in the background." notification when a push message is received and the push event in the service worker does not show a notification after the promise passed to event.waitUntil() has finished.

关于push-notification - 删除网络推送通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49488408/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com