diff --git a/src/drivers/send/strategies.js b/src/drivers/send/strategies.js index e10f49b0..c5656993 100644 --- a/src/drivers/send/strategies.js +++ b/src/drivers/send/strategies.js @@ -18,6 +18,10 @@ export let SEND_MESSAGE_STRATEGIES = { throw new Error(`Window is not on the same domain`); } + if (isSameTopWindow(window, win)) { + throw new Error(`Can only use global method to communicate between two different windows, not between frames`); + } + let sourceDomain = util.getDomain(window); let targetDomain;