diff --git a/src/extensions/default/Phoenix-live-preview/StaticServer.js b/src/extensions/default/Phoenix-live-preview/StaticServer.js index 94fddcabc..6b3c7085f 100644 --- a/src/extensions/default/Phoenix-live-preview/StaticServer.js +++ b/src/extensions/default/Phoenix-live-preview/StaticServer.js @@ -51,6 +51,7 @@ define(function (require, exports, module) { const EVENT_TAB_ONLINE = 'TAB_ONLINE'; const EVENT_REPORT_ERROR = 'REPORT_ERROR'; const EVENT_UPDATE_TITLE_ICON = 'UPDATE_TITLE_AND_ICON'; + const EVENT_SERVER_READY = 'SERVER_READY'; EventDispatcher.makeEventDispatcher(exports); const PHCODE_LIVE_PREVIEW_QUERY_PARAM = "phcodeLivePreview"; @@ -569,4 +570,5 @@ define(function (require, exports, module) { exports.getTabPopoutURL = getTabPopoutURL; exports.hasActiveLivePreviews = hasActiveLivePreviews; exports.PHCODE_LIVE_PREVIEW_QUERY_PARAM = PHCODE_LIVE_PREVIEW_QUERY_PARAM; + exports.EVENT_SERVER_READY = EVENT_SERVER_READY; }); diff --git a/src/extensions/default/Phoenix-live-preview/main.js b/src/extensions/default/Phoenix-live-preview/main.js index 0be32032a..effb16bd6 100644 --- a/src/extensions/default/Phoenix-live-preview/main.js +++ b/src/extensions/default/Phoenix-live-preview/main.js @@ -63,9 +63,7 @@ define(function (require, exports, module) { const PREVIEW_TRUSTED_PROJECT_KEY = "preview_trusted"; const moduleDir = FileUtils.getNativeModuleDirectoryPath(module); - const LIVE_PREVIEW_PANEL_ID = "live-preview-panel", - IFRAME_EVENT_SERVER_READY = 'SERVER_READY'; - let serverReady = false; + const LIVE_PREVIEW_PANEL_ID = "live-preview-panel"; const LIVE_PREVIEW_IFRAME_HTML = `