1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 * For more information on this interface, please see
7 * https://w3c.github.io/ServiceWorker/#extendablemessage-event-section
10 [Exposed=(ServiceWorker)]
11 interface ExtendableMessageEvent : ExtendableEvent {
12 constructor(DOMString type,
13 optional ExtendableMessageEventInit eventInitDict = {});
16 * Custom data associated with this event.
19 readonly attribute any data;
22 * The origin of the site from which this event originated.
24 readonly attribute DOMString origin;
27 * The last event ID string of the event source.
29 readonly attribute DOMString lastEventId;
32 * The client, service worker or port which originated this event.
34 readonly attribute (Client or ServiceWorker or MessagePort)? source;
36 [Constant, Cached, Frozen]
37 readonly attribute sequence<MessagePort> ports;
40 dictionary ExtendableMessageEventInit : ExtendableEventInit {
42 DOMString origin = "";
43 DOMString lastEventId = "";
44 (Client or ServiceWorker or MessagePort)? source = null;
45 sequence<MessagePort> ports = [];