mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +01:00
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:
parent
e888b76534
commit
e6b879048f
4 changed files with 83 additions and 51 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue