diff --git a/src/client/scope.ts b/src/client/scope.ts index 92a3d67..f924e8e 100644 --- a/src/client/scope.ts +++ b/src/client/scope.ts @@ -2,7 +2,8 @@ import { locationProxy } from "./location"; import { documentProxy, windowProxy } from "./window"; function scope(identifier: any) { - if (identifier instanceof Window) { + // this will break iframe postmessage! + if (identifier instanceof Window || identifier instanceof top.window.Window || identifier instanceof parent.window.Window) { return windowProxy; } else if (identifier instanceof Location) { return locationProxy;