mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto merge of #22538 - CYBAI:update-sw-container, r=jdm
Update ServiceWorkerContainer Webidl Looks like the spec has changed a lot. Maybe it's better to update the implementation for these methods in a separate PR. Let's just update webidl in this PR? --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix part of #19302 - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22538) <!-- Reviewable:end -->
This commit is contained in:
commit
248d8596d5
1 changed files with 8 additions and 5 deletions
|
@ -2,25 +2,28 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://w3c.github.io/ServiceWorker/#service-worker-container
|
// https://w3c.github.io/ServiceWorker/#serviceworkercontainer-interface
|
||||||
[Pref="dom.serviceworker.enabled", Exposed=(Window,Worker)]
|
[Pref="dom.serviceworker.enabled", Exposed=(Window,Worker)]
|
||||||
interface ServiceWorkerContainer : EventTarget {
|
interface ServiceWorkerContainer : EventTarget {
|
||||||
[Unforgeable] readonly attribute ServiceWorker? controller;
|
readonly attribute ServiceWorker? controller;
|
||||||
//[SameObject] readonly attribute Promise<ServiceWorkerRegistration> ready;
|
//readonly attribute Promise<ServiceWorkerRegistration> ready;
|
||||||
|
|
||||||
[NewObject] Promise<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<any> getRegistration(optional USVString clientURL = "");
|
||||||
//[NewObject] /* Promise */<sequence<ServiceWorkerRegistration>> getRegistrations();
|
//[NewObject] Promise<FrozenArray<ServiceWorkerRegistration>> getRegistrations();
|
||||||
|
|
||||||
|
//void startMessages();
|
||||||
|
|
||||||
// events
|
// events
|
||||||
//attribute EventHandler oncontrollerchange;
|
//attribute EventHandler oncontrollerchange;
|
||||||
//attribute EventHandler onerror;
|
//attribute EventHandler onerror;
|
||||||
//attribute EventHandler onmessage; // event.source of message events is ServiceWorker object
|
//attribute EventHandler onmessage; // event.source of message events is ServiceWorker object
|
||||||
|
//attribute EventHandler onmessageerror;
|
||||||
};
|
};
|
||||||
|
|
||||||
dictionary RegistrationOptions {
|
dictionary RegistrationOptions {
|
||||||
USVString scope;
|
USVString scope;
|
||||||
//WorkerType type = "classic";
|
//WorkerType type = "classic";
|
||||||
|
ServiceWorkerUpdateViaCache updateViaCache = "imports";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue