Skip to content

Commit

Permalink
Disallow global method between freames
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Brain committed Jul 7, 2016
1 parent d75fc2d commit dd51039
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/drivers/send/strategies.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit dd51039

Please # to comment.