diff --git a/package.json b/package.json index 9abf8b69..b5c5550b 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "c9.ide.newresource": "#636e7a7345", "c9.ide.openfiles": "#2ae85a9e33", "c9.ide.preview": "#5f5fff0185", - "c9.ide.preview.browser": "#9ecfff638d", + "c9.ide.preview.browser": "#1de1b699c8", "c9.ide.preview.markdown": "#c3174d86e0", "c9.ide.pubsub": "#99b7289040", "c9.ide.readonly": "#7421caab61", diff --git a/plugins/c9.preview/static/livecss.js b/plugins/c9.preview/static/livecss.js index 6a262b0b..a9d7eb64 100644 --- a/plugins/c9.preview/static/livecss.js +++ b/plugins/c9.preview/static/livecss.js @@ -1016,10 +1016,12 @@ function send(message) { host == "local" ? "*" : host); } -window.start = function(win) { - parent = win; - init(id); -}; +window.addEventListener("message", function(e) { + if (e.data == "start-c9-livecss") { + parent = e.source; + init(id); + } +}); // Make sure everything is loaded if (parent != window)