chrome 服务工作者接收推送通知的扩展
chrome extension with service worker receiving push notifications
我已经成功构建了一个 service worker,它在 this tutorial 之后接收推送通知。
我正在尝试构建一个 chrome 扩展程序,使我能够订阅推送通知。但是好像扩展运行的时候不支持service worker
Service Worker Error :^( DOMException: Failed to register a ServiceWorker: The URL protocol of the current origin ('chrome-extension://dghajjpcbhcpnnkkgehjhhceemhcacoc') is not supported.
我是否缺少对 manifest.js 的某些权限?
我关注 this tutorial 以获取 Chrome 扩展名。
为 Chrome 扩展启用 Service Worker 仍在进行中。你可以跟踪它 here。好像已经可以在Canary和Dev频道中使用了。
您不需要 Service Worker 就可以在 Chrome 扩展中接收推送通知。您可以使用 chrome.gcm
API.
我已经成功构建了一个 service worker,它在 this tutorial 之后接收推送通知。
我正在尝试构建一个 chrome 扩展程序,使我能够订阅推送通知。但是好像扩展运行的时候不支持service worker
Service Worker Error :^( DOMException: Failed to register a ServiceWorker: The URL protocol of the current origin ('chrome-extension://dghajjpcbhcpnnkkgehjhhceemhcacoc') is not supported.
我是否缺少对 manifest.js 的某些权限?
我关注 this tutorial 以获取 Chrome 扩展名。
为 Chrome 扩展启用 Service Worker 仍在进行中。你可以跟踪它 here。好像已经可以在Canary和Dev频道中使用了。
您不需要 Service Worker 就可以在 Chrome 扩展中接收推送通知。您可以使用 chrome.gcm
API.