navigator.serviceWorker.ready never resolve
Reported by
aver...@gmail.com,
Aug 2 2017
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.73 Safari/537.36 Vivaldi/1.92.915.3 Steps to reproduce the problem: Example: https://jsfiddle.net/4e0vh89n/1/ 1. register serviceWorker 2. wait for navigator.serviceWorker.ready resolving What is the expected behavior? Promise will be resolved when worker become active What went wrong? This promise always pending Did this work before? N/A Does this work in other browsers? N/A Chrome version: 60.0.3112.73 Channel: stable OS Version: Ubuntu 16.04.2 LTS Flash Version: Shockwave Flash 26.0 r0
,
Sep 15 2017
,
Sep 15 2017
The snippet registers a service worker under the scope '/zalun/d80qawf9/show_js/' so the page which seems to live at '/_display/' won't see the service worker. The context you call navigator.serviceWorker.ready from must be inside the scope of the service worker to resolve. By the way, some of the code looks really outdated: navigator.serviceWorker.current was just in the early days and has long been removed from the spec. |
|||
►
Sign in to add a comment |
|||
Comment 1 by jbanavatu@chromium.org
, Sep 15 2017Components: Blink>ServiceWorker
Labels: Needs-Triage-M60 Needs-Feedback
223 KB
223 KB View Download