views:

71

answers:

1

How do I pass data and messages between 2 Firefox Add-Ons (the way Google Chrome does it, here)?

+1  A: 

All Firefox add-ons share the same global scope when you do an overlay (which essentially every add-on uses). You just need to create some shared object to pass data back and forth on.

sdwilsh
Thanks so much!
Chetan
This works but adding to the global namespace is probably not the best strategy. I would say a better approach would be to use JavaScript modules (firefox 3) to create a singleton. See here https://developer.mozilla.org/en/Using_JavaScript_code_modules
fms