File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,15 @@ export default class ContentWrap extends Component {
8585 this . cmCodes . js ,
8686 change . origin !== 'setValue'
8787 ) ;
88- this . onCodeChange ( editor , change ) ;
88+
89+ let now = new Date ( ) ;
90+ console . log ( 'post to iframe:' + this . cmCodes . js , now . toLocaleTimeString ( ) + `.${ now . getMilliseconds ( ) } ` )
91+
92+ document . getElementById ( 'demo-frame' ) . contentWindow . postMessage ( this . cmCodes . js , window . location . href ) ;
93+ now = new Date ( ) ;
94+ console . log ( 'posted to iframe:' + this . cmCodes . js , now . toLocaleTimeString ( ) + `.${ now . getMilliseconds ( ) } ` )
95+
96+ // this.onCodeChange(editor, change);
8997 }
9098 onCodeChange ( editor , change ) {
9199 clearTimeout ( this . updateTimer ) ;
Original file line number Diff line number Diff line change @@ -187,9 +187,15 @@ export function computeJs(
187187 shouldPreventInfiniteLoops ,
188188 infiniteLoopTimeout
189189) {
190+ console . log ( 'Is it recomputing?' )
190191 let code = `window.addEventListener('message', (e) => {
192+ const now = new Date();
193+ console.log('Received:' + e.data, now.toLocaleTimeString() + '.' + now.getMilliseconds())
194+
191195 app.$store.commit('code', e.data);
196+ // app.$store.state.code = e.data
192197 }, false);` ;
198+
193199 var d = deferred ( ) ;
194200 var errors ;
195201
You can’t perform that action at this time.
0 commit comments