Message managers provide a way for chrome-privileged JavaScript code to communicate across process boundaries. They are particularly useful for allowing chrome code, including the browser's code and extension's code, to access web content while the browser is running web content in a separate process.

These guides explain how to use message managers in multiprocess Firefox.

Note that none of this requires multiprocess Firefox: everything described here will work with single-process Firefox, so the same code will work on both variants.


Guides

Message manager overview
 
Frame script loading and lifetime
 
Communicating with frame scripts
 
Performance Best Practices
 
Frame script environment
 
Limitations of frame scripts
 
Process scripts
 

API reference

nsIFrameScriptLoader
 
nsIMessageListenerManager
 
nsIMessageBroadcaster
 
nsIMessageSender
 
nsISyncMessageSender
 
nsIContentFrameMessageManager
 
nsIProcessScriptLoader