0

I want to post message from a content script in top frame to content script in sub iframes(not same origin)

the only ways I found is: post message to backround, and ask the background proxy the message to content script in active page. but it is too indecent.

LiuKairui
  • 21
  • 1
  • 1
    Using `chrome` messaging like you do is the most secure and reliable method. The workaround via frameElem.contentWindow.postMessage is not safe because it can be seen by the page and by all other extensions. However, if the iframe is chrome-extension:// then there are several [direct methods](https://stackoverflow.com/a/68689866). – wOxxOm Mar 25 '23 at 11:13

0 Answers0