Skip to content

Commit 2f151e3

Browse files
fix: frameview postMessage
1 parent b5301df commit 2f151e3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

apps/studio/src/lib/editor/engine/frameview.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,13 @@ export const FrameView = forwardRef<IFrameView, IFrameViewProps>(({ preload, ...
124124
})();
125125
`;
126126

127-
(window as TOnlookWindow).onlook.bridge.send(
128-
WebviewChannels.EXECUTE_CODE,
127+
contentWindow.postMessage(
129128
{
129+
type: WebviewChannels.EXECUTE_CODE,
130130
code: wrappedCode,
131131
messageId,
132132
},
133+
'*',
133134
[channel.port2],
134135
);
135136
});

0 commit comments

Comments
 (0)