mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Update webidl of ServiceWorkerGlobalScope
This commit is contained in:
parent
b1a2b6b5bf
commit
df1a3a7ea3
2 changed files with 6 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue