We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS


This interface provides the environment for scripts that are loaded into content frames using the nsIFrameScriptLoader interface. It enables these scripts to receive messages from the chrome process and send messages back to the chrome process.

Frame scripts can send either synchronous or asynchronous messages to the chrome process: for details on these messaging APIs see the documentation for the nsIContentFrameMessageManager's parent classes nsISyncMessageSender and nsIMessageSender.


void dump(in DOMString aStr);
DOMString atob(in DOMString aAsciiString);
DOMString btoa(in DOMString aBase64Data);


Prints the specified string to standard output.


Name Type Description
aStr String The message to log.


Convert ASCII base64 data to binary data.


Name Type Description
aAsciiString String ASCII string to decode.


String: the decoded binary data.


Convert binary data to ASCII base64 data .


Name Type Description
aBase64Data String Binary data to encode as base64.


String: the base64-encoded ASCII string.



nsIDOMWindow: the current top level window in the frame or null. Read only.


nsIDocShell: the top level docShell or null. Read only.


Once you obtain the conten frame messge manager, you can send messages to listeners who registered with Services.mm.addMessageListener

Get content message manager from browser

This could would run in a nsIDOMWindow scope.

var aCFMM = gBrowser.selectedBrowser._docShell.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIContentFrameMessageManager);

Get content message manager from content window

window here is a HTML window or any window inside a tab, this code would run from a framescript.

var aCFMM = window.QueryInterface(Ci.nsIInterfaceRequestor)

Document Tags and Contributors

Contributors to this page: Noitidart, wbamberg, Sheppy, Laurentj
Last updated by: Noitidart,