I was editing message-manager docs and found that <browser>.messageManager is only implemented in Fennec, not in the core bindings. Since we're encouraging extension authors to start using the message manager now in Firefox, we should make that property available.
Created attachment 492426 [details] [diff] [review] patch As Benjamin states, this property is active in Firefox 4, so it will work fine. Once this lands, I can remove the same property from the Fennec extended binding.
I was going to write a test, too. I know things are all loosey-goosey in mobile-land, but I'd really like to make sure this actually works.
(In reply to comment #2) > I was going to write a test, too. I know things are all loosey-goosey in > mobile-land, but I'd really like to make sure this actually works. Yeah, none of our current tests would pass if this failed. I guess browser-chrome would work. A small test would be easy for me to add.
Comment on attachment 492426 [details] [diff] [review] patch r=me with a test added. I'm not exactly clear on what this can be used for by extensions in Firefox 4, and I suppose a test would help with that (and also be useful for documentation purposes).
We might want to mirror it on tabbrowser as well (as we do with other browser properties like currentURI).
I don't *think* we want to expose it on the tabbrowser. If you want to attach a behavior to all loaded tabs you want window.messageManager, not <browser>.messageManager.
tabbrowser mirrors many of the properties of its selected <browser> for convenience (tabbrowser.currentURI, .docShell, .webProgress, .contentDocument, etc.) It's probably more confusing than it is convenient, though, so I don't mind not extending that pattern for this case.
Created attachment 495829 [details] [diff] [review] With tests
Updated documentation: https://developer.mozilla.org/en/The_message_manager https://developer.mozilla.org/en/XUL/browser https://developer.mozilla.org/en/XUL/Property/messageManager https://developer.mozilla.org/en/DOM/window https://developer.mozilla.org/en/DOM/window.messageManager This should be done now.