Update webidl of ServiceWorkerGlobalScope

This commit is contained in:
mandreyel 2018-11-13 22:50:03 +01:00
parent b1a2b6b5bf
commit df1a3a7ea3
2 changed files with 6 additions and 3 deletions

View file

@ -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);
}

View file

@ -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;
};