nsISupports
Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)void sendMessage(in AString aMessageName /* [optional] in jsval v1, [optional] in jsval v2, ... */); |
void registerReceiver(in AString aMessageName, in jsval aReceiver); |
void unregisterReceiver(in AString aMessageName, in jsval aReceiver); |
void unregisterReceivers(in AString aMessageName); |
void evalScript(in AString aScript); |
nsIVariant createHandle(); |
void destroy(); |
This method asynchronously sends a message to the Jetpack process.
void sendMessage( in AString aMessageName, [optional] in jsval v1, Optional [optional] in jsval v2, Optional ... );
aMessageName
v1, v2, ...
OptionalThis registers a callback to be triggered whenever the Jetpack process sends a particular message.
void registerReceiver( in AString aMessageName, in jsval aReceiver );
aMessageName
aReceiver
callMessage()
, then the return value of this function is passed back to the Jetpack process.This unregisters a callback previously registered with registerReceiver()
void unregisterReceiver( in AString aMessageName, in jsval aReceiver );
aMessageName
aReceiver
This unregisters all callbacks previously registered with registerReceiver()
for a particular message.
void unregisterReceivers( in AString aMessageName );
aMessageName
This asynchronously sends code to the Jetpack process for evaluation. The code will be evaluated using at least JavaScript 1.8.1.
When evaluated, the script's global scope will include all privileged APIs.
Individual lines of the form //@line 1 "foo.js"
can be used to specify filename and line number information for debugging purposes.
void evalScript( in AString aScript );
aScript
This creates an opaque handle that can transparently be exchanged between processes.
nsIVariant createHandle();
None.
The new handle.
This terminates the Jetpack process.
void destroy();
None.
If an exception goes uncaught in the Jetpack process, it will be reported to the chrome process via a message with the name core:exception
. The message comes with one argument, which represents the exception object that was thrown.
Warning: bug 589308 prevents this message from being sent in some situations.
See bug 556846 for details.