Closed
Bug 1214583
Opened 10 years ago
Closed 5 years ago
loadFramescript loads into things without messageManager
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: noitidart, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Build ID: 20151008162217
Steps to reproduce:
I attached a delayed framescript, and it seems to add into things that don't have a message manager.
Like for instance:
<iframe type="content" src="resource://nimbusscreencaptureff-at-everhelper-dot-me/nimbus-screen-capture/data/popup.html" flex="1" transparent="transparent" autocompleteenabled="true">
So it's not possible to communicate to that with aMsgEvent.target.messageManager.sendAsyncMessage
Updated•10 years ago
|
Component: Untriaged → DOM
Product: Firefox → Core
Comment 1•10 years ago
|
||
I assume that iframe is somewhere in chrome.
You should be able to access its message manager using
var owner = aMsgEvent.target.QueryInterface(Components.interfaces.nsIFrameLoaderOwner);
if (owner.frameLoader) {
return owner.frameLoader.messageManager
}
Note, xul:browser just has a helper method for this.
http://mxr.mozilla.org/mozilla-central/source/toolkit/content/widgets/browser.xml#314
Ah thanks Olli! Is this mentioned somewhere in docs, else where would it be best to update?
Comment 3•10 years ago
|
||
Well https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/browser does mention messageManager and
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/iframe doesn't, so it is sort of documented.
| Assignee | ||
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
Updated•5 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•