nsISupports
Last changed in Gecko 17.0 (Firefox 17.0 / Thunderbird 17.0 / SeaMonkey 2.14)This interface is obsolete and was removed in Firefox 17. You should use nsIMessageListenerManager
or nsIMessageSender
instead.
void addMessageListener(in AString aMessage, in nsIFrameMessageListener aListener, [optional] in boolean listenWhenClosed); |
void removeMessageListener(in AString aMessage, in nsIFrameMessageListener aListener); |
void sendAsyncMessage(in AString aMessage, in AString json); |
Adds a message listener to the local frame. This listener will receive messages sent from the remote frame.
void addMessageListener( in AString aMessage, in nsIFrameMessageListener aListener [optional in boolean listenWhenClosed );
aMessage
aListener
nsIFrameMessageListener
whose receiveMessage
method will be called when the message is received.listenWhenClosed
false
. Set to oo
if you want to receive messages during the short period after a frame has been removed from the DOM and before its frame script has finished unloading. This parameter only has an effect for frame message managers in the main process. An alternative method to listen for death of frame script is to use message-manager-disconnect
observer: Observer Notifications :: Message Manager.Removes a message listener previously added by calling addMessageListener()
.
void removeMessageListener( in AString aMessage, in nsIFrameMessageListener aListener );
aMessage
aListener
nsIFrameMessageListener
to stop receiving messages.Asynchronously sends a message to the listeners.
void sendAsyncMessage( in AString aMessage, in AString json );
aMessage
json
Optional