forked from mirrors/gecko-dev
<!-- Please describe your changes on the following line: --> The old specification URL is https://slightlyoff.github.io/ServiceWorker/spec/service_worker/, which has been replaced by the new one at https://w3c.github.io/ServiceWorker/. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #13408 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because all the changes are in commented parts of the code. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> The old specification URL is https://slightlyoff.github.io/ServiceWorker/spec/service_worker/ has been replaced by the new one at https://w3c.github.io/ServiceWorker/. Source-Repo: https://github.com/servo/servo Source-Revision: d00639c55f9a342765483d347a3c29d4647f7411
24 lines
744 B
Text
24 lines
744 B
Text
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
// http://w3c.github.io/ServiceWorker/#service-worker-obj
|
|
[Pref="dom.serviceworker.enabled", Exposed=(Window,Worker)]
|
|
interface ServiceWorker : EventTarget {
|
|
readonly attribute USVString scriptURL;
|
|
readonly attribute ServiceWorkerState state;
|
|
[Throws] void postMessage(any message/*, optional sequence<Transferable> transfer*/);
|
|
|
|
// event
|
|
attribute EventHandler onstatechange;
|
|
};
|
|
|
|
ServiceWorker implements AbstractWorker;
|
|
|
|
enum ServiceWorkerState {
|
|
"installing",
|
|
"installed",
|
|
"activating",
|
|
"activated",
|
|
"redundant"
|
|
};
|