ExtendableMessageEvent.webidl (1395B)
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/. 5 * 6 * For more information on this interface, please see 7 * https://w3c.github.io/ServiceWorker/#extendablemessage-event-section 8 */ 9 10 [Exposed=(ServiceWorker)] 11 interface ExtendableMessageEvent : ExtendableEvent { 12 constructor(DOMString type, 13 optional ExtendableMessageEventInit eventInitDict = {}); 14 15 /** 16 * Custom data associated with this event. 17 */ 18 [GetterThrows] 19 readonly attribute any data; 20 21 /** 22 * The origin of the site from which this event originated. 23 */ 24 readonly attribute DOMString origin; 25 26 /** 27 * The last event ID string of the event source. 28 */ 29 readonly attribute DOMString lastEventId; 30 31 /** 32 * The client, service worker or port which originated this event. 33 */ 34 readonly attribute (Client or ServiceWorker or MessagePort)? source; 35 36 [Constant, Cached, Frozen] 37 readonly attribute sequence<MessagePort> ports; 38 }; 39 40 dictionary ExtendableMessageEventInit : ExtendableEventInit { 41 any data = null; 42 DOMString origin = ""; 43 DOMString lastEventId = ""; 44 (Client or ServiceWorker or MessagePort)? source = null; 45 sequence<MessagePort> ports = []; 46 };