Skip to content

Commit f6aa546

Browse files
committed
Eval ConsoleInput command in preview frame
1 parent 46f62e3 commit f6aa546

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

client/modules/IDE/components/ConsoleInput.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ConsoleInput extends React.Component {
2929
if (value.trim(' ') === '') {
3030
return false;
3131
}
32-
const messages = [{ log: { method: 'command', data: Encode(value) } }];
32+
const messages = [{ log: Encode({ method: 'command', data: Encode(value) }) }];
3333
const consoleEvent = [{ method: 'command', data: Encode(value) }];
3434
dispatch({
3535
source: 'console',

client/modules/IDE/components/PreviewFrame.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class PreviewFrame extends React.Component {
5252
isAccessibleOutputPlaying: this.props.isAccessibleOutputPlaying
5353
};
5454
if (shouldRenderSketch(props)) this.renderSketch();
55-
registerFrame(this.iframe.current);
55+
registerFrame(this.iframe.current.contentWindow);
5656
}
5757

5858
componentDidUpdate(prevProps) {

client/utils/previewEntry.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ setInterval(() => {
2424
}, LOGWAIT);
2525

2626
function handleMessageEvent(e) {
27-
console.log('in preview entry handle message event');
2827
if (window.origin !== e.origin) return;
2928
const { data } = e;
3029
const { source, messages } = data;

0 commit comments

Comments
 (0)