1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/webidl/InterAppMessagePort.webidl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,24 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +// TODO Bug 907060 Per off-line discussion, after the MessagePort is done 1.9 +// at Bug 643325, we will start to refactorize the common logic of both 1.10 +// Inter-App Communication and Shared Worker. For now, we hope to design an 1.11 +// MozInterAppMessagePort to meet the timeline, which still follows exactly 1.12 +// the same interface and semantic as the MessagePort is. In the future, 1.13 +// we can then align it back to MessagePort with backward compatibility. 1.14 + 1.15 +[HeaderFile="mozilla/dom/InterAppComm.h", 1.16 + Func="mozilla::dom::InterAppComm::EnabledForScope", 1.17 + Constructor(DOMString messagePortID), 1.18 + JSImplementation="@mozilla.org/dom/inter-app-message-port;1"] 1.19 +interface MozInterAppMessagePort : EventTarget { 1.20 + void postMessage(any message); 1.21 + 1.22 + void start(); 1.23 + 1.24 + void close(); 1.25 + 1.26 + attribute EventHandler onmessage; 1.27 +};