I have an iframe in an extension popup window. The iframe src points
to a web site.
When I single step over this line in my code:
this.port.postMessage(message);
I get this message:
Unsafe JavaScript attempt to access frame with URL chrome-extension://
almkanjceicbdnobboiimcoehaodenjf/ppa.html#2 from frame with URL
http://orionhub.org/file/Fu/purple.html. Domains, protocols and ports
must match.
|this.port| is a MessagePort delivered by a postMessage() call from
the extension to the iframe. So obviously I can send in that
direction. I trigger the delivery of the MessagePort using
portMessage() from the iframe up to the extension window. So obviously
I can send in the other direction.
Since postMessage works in both directions and only
MessagePort.postMessage() from iframe to extension fails, I conclude
there must be a bug in MessagePort. Anyone have other information on
this?
jjb