[ServiceWorker] Specify .focus() and .openWindow() behaviour (#602)

cc @annevk @jakearchibald 

I think it's fairly important if this could be specified sooner than later. Chrome is going to ship this relatively soon and we don't want to end up with other implementations having to copy us instead of reading the spec. The behaviour of those two methods will not be trivial, especially regarding the rejecting behaviour.

I think it might be interesting to define when .focus() and .openWindow() should be authorized. FWIW, Chrome will give a token to the SW when the notificationclick event runs. At the end of .waitUntil(), that token will be revoked. While the event is running, one .focus() or .openWindow() will be allowed. We will very likely add a timeout too.

---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/602

Received on Thursday, 15 January 2015 14:50:11 UTC