mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 23:10:02 -04:00
check other window instances in scope function
This commit is contained in:
parent
408bf39ffd
commit
1b55a1672a
1 changed files with 2 additions and 1 deletions
|
@ -2,7 +2,8 @@ import { locationProxy } from "./location";
|
||||||
import { documentProxy, windowProxy } from "./window";
|
import { documentProxy, windowProxy } from "./window";
|
||||||
|
|
||||||
function scope(identifier: any) {
|
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;
|
return windowProxy;
|
||||||
} else if (identifier instanceof Location) {
|
} else if (identifier instanceof Location) {
|
||||||
return locationProxy;
|
return locationProxy;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue