Skip to content

Commit 03c052c

Browse files
committed
scope handling fix (wip)
1 parent 23a6410 commit 03c052c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/htmlunit/javascript/host/Window.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1985,7 +1985,7 @@ public static void postMessage(final Context context, final Scriptable scope,
19851985
}
19861986
}
19871987

1988-
final Window sender = (Window) scope;
1988+
final Window sender = (Window) ScriptableObject.getTopLevelScope(scope).getGlobalThis();
19891989
final Window receiver = (Window) thisObj;
19901990
final URL receiverURL = receiver.getWebWindow().getEnclosedPage().getUrl();
19911991

0 commit comments

Comments
 (0)