Skip to content

Commit d6b2f9a

Browse files
committed
tell parent to reload page
1 parent 9a6a310 commit d6b2f9a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎src/playground/render-interface.jsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ const WrappedMenuBar = compose(
7070

7171
if (AddonChannels.reloadChannel) {
7272
AddonChannels.reloadChannel.addEventListener('message', () => {
73-
location.reload();
73+
if (window.top !== window.self) { // if in iframe
74+
window.parent.postMessage({ type: "block-compiler-action", action: "reload"}, "*");
75+
} else {
76+
location.reload();
77+
}
7478
});
7579
}
7680

0 commit comments

Comments
 (0)