From dd5103985b9d937003427c9a7b1ff8daba0f977a Mon Sep 17 00:00:00 2001 From: Daniel Brain Date: Wed, 6 Jul 2016 22:04:38 -0700 Subject: [PATCH] Disallow global method between freames --- src/drivers/send/strategies.js | 4 ++++ 1 file changed, 4 insertions(+) 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;