Skip to content

Commit d2fc4b1

Browse files
committed
refactor: remote fns should work without the extension as well
1 parent 8268bc1 commit d2fc4b1

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121

2222
/*jslint forin: true */
23-
/*global Node, MessageEvent, strings, icons, cssStyles */
23+
/*global Node, MessageEvent*/
2424
/*theseus instrument: false */
2525

2626
/**
@@ -101,6 +101,7 @@ function RemoteFunctions(config = {}) {
101101
*/
102102
var _editHandler;
103103

104+
let strings = {}, icons = {}, cssStyles = {}; // these will be injected below
104105
// the below code comment is replaced by added scripts for extensibility
105106
// REPLACE_WITH_ADDED_REMOTE_CONSTANT_SCRIPTS
106107

src/extensionsIntegrated/phoenix-pro/remote-constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ define(function (require, exports, module) {
4141
};
4242

4343
LiveDevProtocol.addRemoteFunctionConstantsScript("strings",
44-
`const strings = ${JSON.stringify(remoteStrings)};`);
44+
`strings = ${JSON.stringify(remoteStrings)};`);
4545
});

src/extensionsIntegrated/phoenix-pro/remote-icons.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,5 +132,5 @@ define(function (require, exports, module) {
132132
};
133133

134134
LiveDevProtocol.addRemoteFunctionConstantsScript("icons",
135-
`const icons = ${JSON.stringify(remoteIcons)};`);
135+
`icons = ${JSON.stringify(remoteIcons)};`);
136136
});

src/extensionsIntegrated/phoenix-pro/remote-styles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,5 +992,5 @@ define(function (require, exports, module) {
992992
};
993993

994994
LiveDevProtocol.addRemoteFunctionConstantsScript("styles",
995-
`const cssStyles = ${JSON.stringify(remoteStyles)};`);
995+
`cssStyles = ${JSON.stringify(remoteStyles)};`);
996996
});

0 commit comments

Comments
 (0)