dom/interfaces/events/nsIDOMMessageEvent.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #include "nsIDOMEvent.idl"
michael@0 7
michael@0 8 /**
michael@0 9 * The nsIDOMMessageEvent interface is used for server-sent events and for
michael@0 10 * cross-domain messaging.
michael@0 11 *
michael@0 12 * For more information on this interface, please see
michael@0 13 * http://www.whatwg.org/specs/web-apps/current-work/#messageevent
michael@0 14 */
michael@0 15 [scriptable, builtinclass, uuid(bb869a03-5fc0-4a1b-838a-342e5025fc05)]
michael@0 16 interface nsIDOMMessageEvent : nsIDOMEvent
michael@0 17 {
michael@0 18 /**
michael@0 19 * Custom string data associated with this event.
michael@0 20 */
michael@0 21 [implicit_jscontext]
michael@0 22 readonly attribute jsval data;
michael@0 23
michael@0 24 /**
michael@0 25 * The origin of the site from which this event originated, which is the
michael@0 26 * scheme, ":", and if the URI has a host, "//" followed by the
michael@0 27 * host, and if the port is not the default for the given scheme,
michael@0 28 * ":" followed by that port. This value does not have a trailing slash.
michael@0 29 */
michael@0 30 readonly attribute DOMString origin;
michael@0 31
michael@0 32 /**
michael@0 33 * The last event ID string of the event source, for server-sent DOM events; this
michael@0 34 * value is the empty string for cross-origin messaging.
michael@0 35 */
michael@0 36 readonly attribute DOMString lastEventId;
michael@0 37
michael@0 38 /**
michael@0 39 * The window which originated this event.
michael@0 40 */
michael@0 41 readonly attribute nsIDOMWindow source;
michael@0 42
michael@0 43 /**
michael@0 44 * Initializes this event with the given data, in a manner analogous to
michael@0 45 * the similarly-named method on the nsIDOMEvent interface, also setting the
michael@0 46 * data, origin, source, and lastEventId attributes of this appropriately.
michael@0 47 */
michael@0 48 void initMessageEvent(in DOMString aType,
michael@0 49 in boolean aCanBubble,
michael@0 50 in boolean aCancelable,
michael@0 51 in jsval aData,
michael@0 52 in DOMString aOrigin,
michael@0 53 in DOMString aLastEventId,
michael@0 54 in nsIDOMWindow aSource);
michael@0 55 };

mercurial