[w3c/ServiceWorker] spec says `update()` should resolve to a registration, but browsers resolve to undefined (#1304)

See the uses of "Resolve Job Promise" in update and install algorithms:

https://w3c.github.io/ServiceWorker/#ref-for-resolve-job-promise%E2%91%A0
https://w3c.github.io/ServiceWorker/#ref-for-resolve-job-promise%E2%91%A1

They pass a registration to "Resolve Job Promise".  That algorithm then says to expose it to script for either register or update jobs:

https://w3c.github.io/ServiceWorker/#resolve-job-promise-algorithm

AFAICT we don't have any WPT tests that actually assert the resolved value of `update()`.  As a result we have an incompatibility:

* Firefox and chrome resolve undefined.
* Edge and Safari TP resolve a registration

I'm inclined to conform to the spec and edge/safari here.  And I can write a WPT test.

@jakearchibald @jungkees @mattto What do you think?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1304

Received on Friday, 20 April 2018 18:46:13 UTC