mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 15:00:01 -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";
|
||||
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue