Both the WebIDL Exposed= flag and relevant implementation.
registration-attribute.https.html examines this.
I think this might be a compat issue worth fixing soon. It seems somewhat reasonable that a service worker might try to do self.registration.active.postMessage() in an install event to communicate with the worker its replacing.
I'm going to take this because I need it for writing some other tests. Also its a major compat issue!
Assignee: nobody → bkelly
Status: NEW → ASSIGNED
Unfortunately I ran out of time to work on this.
Assignee: bkelly → nobody
Status: ASSIGNED → NEW
Does chrome already implement this?
Yes. They also failed to handle self-postMessage() properly allowing SW's to be kept alive infinitely. They are fixing now. We should be careful to avoid that as well. You may want to wait until I do my clients changes for this. I will be exposing Worker as a client and may be able to re-use infrastructure.
Summary: Expose ServiceWorker in Workers → Expose ServiceWorker in Workers (aka ServiceWorkerRegistration returns null for all of installing, waiting, active in Workers/ServiceWorkers)
You need to log in before you can comment on or make changes to this bug.