4 ms·
Interesting...but haven't Chrome extensions always been able to communicate with content scripts (and back) through chrome.extension.sendRequest? If I understa
by scotth 16y ago
Interesting...but haven't Chrome extensions always been able to communicate with content scripts (and back) through chrome.extension.sendRequest?
If I understand correctly, what you've managed to do is communicate with embedding page's scripts, in a cleaner way than the one suggested by Google.
- mceachen 16y agoYou're correct, unless you're playing with ifrmes. tabs.sendRequest doesn't allow you to talk to scripts in iframes -- only the tabs.executeScript has the allFrames param, and but that script will be sandboxed from the content scripts (hence the postMessage workaround).