javascript - Is it allowed to use window.postMessage() in a chrome extension? -
i have finished coding extension chrome , firefox (webextensions). have used window.postmessage() communication between website script , extension , works.
but reading there methods chrome (https://developer.chrome.com/extensions/messaging) chrome.runtime.sendmessage()
to send messages. extension rejected if use window.postmessage() have recode everything?
yes, valid way of communication - between page , content script.
in fact, if @ content script documentation, lists postmessage
way of communication content script.
the method described @ messaging documentation allows cut out content script middleman, , provides degree authentication messages (only indended recipient receive them), providing configured "externally_connectable"
.
but "externally_connectable"
not supported in firefox yet, , can't find bug tracks implementation.
Comments
Post a Comment