Closed Bug 614015 Opened 9 years ago Closed 9 years ago

Add <browser>.messageManager property

Categories

(Toolkit :: XUL Widgets, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla2.0b8

People

(Reporter: benjamin, Assigned: mfinkle)

Details

(Keywords: dev-doc-complete, Whiteboard: [e10s])

Attachments

(2 files)

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.
Attached patch patchSplinter Review
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.
Assignee: nobody → mark.finkle
Attachment #492426 - Flags: review?(gavin.sharp)
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).
Attachment #492426 - Flags: review?(gavin.sharp) → review+
We might want to mirror it on tabbrowser as well (as we do with other browser properties like currentURI).
Keywords: dev-doc-needed
OS: Windows 7 → All
Hardware: x86 → All
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.
Attached patch With testsSplinter Review
Attachment #495829 - Flags: approval2.0+
Attachment #495829 - Attachment is patch: true
Attachment #495829 - Attachment mime type: application/octet-stream → text/plain
http://hg.mozilla.org/mozilla-central/rev/7de7681aa6d3
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
Whiteboard: [e10s]
You need to log in before you can comment on or make changes to this bug.