mirror of
https://github.com/servo/servo.git
synced 2025-06-17 12:54:28 +00:00
Update ServiceWorker webidl
This commit is contained in:
parent
47eb8fe3db
commit
370ee8984f
1 changed files with 4 additions and 3 deletions
|
@ -2,17 +2,18 @@
|
||||||
* 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/. */
|
||||||
|
|
||||||
// http://w3c.github.io/ServiceWorker/#service-worker-obj
|
// https://w3c.github.io/ServiceWorker/#serviceworker-interface
|
||||||
[Pref="dom.serviceworker.enabled", Exposed=(Window,Worker)]
|
[Pref="dom.serviceworker.enabled", SecureContext, Exposed=(Window,Worker)]
|
||||||
interface ServiceWorker : EventTarget {
|
interface ServiceWorker : EventTarget {
|
||||||
readonly attribute USVString scriptURL;
|
readonly attribute USVString scriptURL;
|
||||||
readonly attribute ServiceWorkerState state;
|
readonly attribute ServiceWorkerState state;
|
||||||
[Throws] void postMessage(any message/*, optional sequence<Transferable> transfer*/);
|
[Throws] void postMessage(any message/*, optional sequence<object> transfer = []*/);
|
||||||
|
|
||||||
// event
|
// event
|
||||||
attribute EventHandler onstatechange;
|
attribute EventHandler onstatechange;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FIXME: use `includes` instead of `implements` after #22539 is fixed.
|
||||||
ServiceWorker implements AbstractWorker;
|
ServiceWorker implements AbstractWorker;
|
||||||
|
|
||||||
enum ServiceWorkerState {
|
enum ServiceWorkerState {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue