From 8b69ab7fdd27f9faa7dd68f68077ff870c58db92 Mon Sep 17 00:00:00 2001 From: therewasaguy Date: Sun, 17 Jul 2016 20:49:10 -0400 Subject: [PATCH] really clear sketch when sketch is stopped --- client/modules/IDE/components/PreviewFrame.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/client/modules/IDE/components/PreviewFrame.js b/client/modules/IDE/components/PreviewFrame.js index ac42e845..8d119e25 100644 --- a/client/modules/IDE/components/PreviewFrame.js +++ b/client/modules/IDE/components/PreviewFrame.js @@ -115,15 +115,10 @@ class PreviewFrame extends React.Component { renderSketch() { const doc = ReactDOM.findDOMNode(this); if (this.props.isPlaying) { - // TODO add polyfill for this - // doc.srcdoc = this.injectLocalFiles(); srcDoc.set(doc, this.injectLocalFiles()); } else { - // doc.srcdoc = ''; - srcDoc.set(doc, ''); - doc.contentWindow.document.open(); - doc.contentWindow.document.write(''); - doc.contentWindow.document.close(); + doc.srcdoc = ''; + srcDoc.set(doc, ' '); } }