Add Promises to Service Worker Container

The purpose of the code changes is to enable the use of promises in the Service Worker container. I also modified the Service Worker test in order to support the promises.
This commit is contained in:
Patrick Trottier 2016-09-28 21:36:11 +00:00
parent e888b76534
commit e6b879048f
4 changed files with 83 additions and 51 deletions

View file

@ -8,7 +8,7 @@ interface ServiceWorkerContainer : EventTarget {
[Unforgeable] readonly attribute ServiceWorker? controller;
//[SameObject] readonly attribute Promise<ServiceWorkerRegistration> ready;
[NewObject, Throws] ServiceWorkerRegistration register(USVString scriptURL, optional RegistrationOptions options);
[NewObject] Promise<ServiceWorkerRegistration> register(USVString scriptURL, optional RegistrationOptions options);
//[NewObject] /*Promise<any>*/ any getRegistration(optional USVString clientURL = "");
//[NewObject] /* Promise */<sequence<ServiceWorkerRegistration>> getRegistrations();