aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2018-11-16 19:55:30 -0500
committerGitHub <noreply@github.com>2018-11-16 19:55:30 -0500
commite50e2621fe90c443271ae29ab6ee72799fdad918 (patch)
treeac42336e13a3f51f30a5ea596352349bba9205ad
parent0ab2c3f8a37631bda574abf15afcb17e4d1ebf08 (diff)
parentdf1a3a7ea3855b125f6c3d83a5cf7e3613966dd8 (diff)
downloadservo-e50e2621fe90c443271ae29ab6ee72799fdad918.tar.gz
servo-e50e2621fe90c443271ae29ab6ee72799fdad918.zip
Auto merge of #22191 - mandreyel:update-sw-global-scope, r=paulrouget
Update webidl of ServiceWorkerGlobalScope Part of #19302. --- <!-- 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 are part of #19302 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they just update the webidl for `ServiceWorkerGlobalScope`; related tests should be updated when we start to implement its functions. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/22191) <!-- Reviewable:end -->
-rw-r--r--components/script/dom/serviceworkerglobalscope.rs5
-rw-r--r--components/script/dom/webidls/ServiceWorkerGlobalScope.webidl4
2 files changed, 6 insertions, 3 deletions
diff --git a/components/script/dom/serviceworkerglobalscope.rs b/components/script/dom/serviceworkerglobalscope.rs
index c6f87f6e144..45e8934d0de 100644
--- a/components/script/dom/serviceworkerglobalscope.rs
+++ b/components/script/dom/serviceworkerglobalscope.rs
@@ -436,6 +436,9 @@ unsafe extern "C" fn interrupt_callback(cx: *mut JSContext) -> bool {
}
impl ServiceWorkerGlobalScopeMethods for ServiceWorkerGlobalScope {
- // https://w3c.github.io/ServiceWorker/#service-worker-global-scope-onmessage-attribute
+ // https://w3c.github.io/ServiceWorker/#dom-serviceworkerglobalscope-onmessage
event_handler!(message, GetOnmessage, SetOnmessage);
+
+ // https://w3c.github.io/ServiceWorker/#dom-serviceworkerglobalscope-onmessageerror
+ event_handler!(messageerror, GetOnmessageerror, SetOnmessageerror);
}
diff --git a/components/script/dom/webidls/ServiceWorkerGlobalScope.webidl b/components/script/dom/webidls/ServiceWorkerGlobalScope.webidl
index 9259c3d64c4..9e3f26695fd 100644
--- a/components/script/dom/webidls/ServiceWorkerGlobalScope.webidl
+++ b/components/script/dom/webidls/ServiceWorkerGlobalScope.webidl
@@ -2,7 +2,7 @@
* 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/. */
-// https://w3c.github.io/ServiceWorker/#service-worker-global-scope
+// https://w3c.github.io/ServiceWorker/#serviceworkerglobalscope
[Global=(Worker,ServiceWorker), Exposed=ServiceWorker,
Pref="dom.serviceworker.enabled"]
@@ -17,8 +17,8 @@ interface ServiceWorkerGlobalScope : WorkerGlobalScope {
//attribute EventHandler oninstall;
//attribute EventHandler onactivate;
//attribute EventHandler onfetch;
- //attribute EventHandler onforeignfetch;
// event
attribute EventHandler onmessage; // event.source of the message events is Client object
+ attribute EventHandler onmessageerror;
};