michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: * michael@0: * For more information on this interface, please see michael@0: * http://www.whatwg.org/specs/web-apps/current-work/#messageevent michael@0: */ michael@0: michael@0: interface WindowProxy; michael@0: michael@0: [Constructor(DOMString type, optional MessageEventInit eventInitDict)] michael@0: interface MessageEvent : Event { michael@0: /** michael@0: * Custom data associated with this event. michael@0: */ michael@0: [GetterThrows] michael@0: readonly attribute any data; michael@0: michael@0: /** michael@0: * The origin of the site from which this event originated, which is the michael@0: * scheme, ":", and if the URI has a host, "//" followed by the michael@0: * host, and if the port is not the default for the given scheme, michael@0: * ":" followed by that port. This value does not have a trailing slash. michael@0: */ michael@0: readonly attribute DOMString origin; michael@0: michael@0: /** michael@0: * The last event ID string of the event source, for server-sent DOM events; this michael@0: * value is the empty string for cross-origin messaging. michael@0: */ michael@0: readonly attribute DOMString lastEventId; michael@0: michael@0: /** michael@0: * The window or the port which originated this event. michael@0: */ michael@0: readonly attribute (WindowProxy or MessagePort)? source; michael@0: michael@0: /** michael@0: * Initializes this event with the given data, in a manner analogous to michael@0: * the similarly-named method on the nsIDOMEvent interface, also setting the michael@0: * data, origin, source, and lastEventId attributes of this appropriately. michael@0: */ michael@0: readonly attribute MessagePortList? ports; michael@0: }; michael@0: michael@0: dictionary MessageEventInit : EventInit { michael@0: any data; michael@0: DOMString origin; michael@0: DOMString lastEventId; michael@0: (WindowProxy or MessagePort)? source = null; michael@0: sequence? ports; michael@0: };