Content Process Event Handlers: Difference between revisions

no edit summary
mNo edit summary
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
'''The latest message manager documentation can be found on MDN: [https://developer.mozilla.org/en-US/Firefox/Multiprocess_Firefox/The_message_manager The Message Manager]'''
[https://bugzilla.mozilla.org/show_bug.cgi?id=542242 Bug 542242] added support for content process event listeners. The basic idea is that chrome asks content process to load script files which add listeners to the content process' root event handling scope. The event listeners can then send messages to chrome process.
[https://bugzilla.mozilla.org/show_bug.cgi?id=542242 Bug 542242] added support for content process event listeners. The basic idea is that chrome asks content process to load script files which add listeners to the content process' root event handling scope. The event listeners can then send messages to chrome process.


Line 80: Line 83:


<h4>Forward a message from chrome to content</h4>
<h4>Forward a message from chrome to content</h4>
This will broadcast a message to *all* content tabs.
<pre>
<pre>
// contentscript.js
// contentscript.js
Confirmed users
1,983

edits