There is extensive documentation, including examples, on how to communicate between page scripts and content scripts using custom DOM events.
Alternatively, you can use unsafeWindow, but there are potential security issues, and your extension will probably get rejected from addons.mozilla.org (AMO)