diff --git a/docs/development/DEV_SETUP.md b/docs/development/DEV_SETUP.md index 61fff70b..7aa4743e 100644 --- a/docs/development/DEV_SETUP.md +++ b/docs/development/DEV_SETUP.md @@ -27,6 +27,10 @@ - npm run demo-win (for windows) - npm run demo-mac (for mac osx) +Remember to set this.origin to '*' in app-bridge.ts when running the demo. Search +for // DEMO-APP: and comment that line back in. Make sure to comment it out again +before you commit. + ## Build Instructions: ### Mac diff --git a/src/demo/README.md b/src/demo/README.md index e6e1e15c..2021833a 100644 --- a/src/demo/README.md +++ b/src/demo/README.md @@ -1,3 +1,7 @@ To start the demo from command line do: - npm install - npm run demo + +Remember to set this.origin to '*' in app-bridge.ts when running the demo. Search +for // DEMO-APP: and comment that line back in. Make sure to comment it out again +before you commit. \ No newline at end of file diff --git a/src/demo/index.html b/src/demo/index.html index bb9961a7..f6aafe78 100644 --- a/src/demo/index.html +++ b/src/demo/index.html @@ -25,11 +25,31 @@ border-radius: 50%; display: inline-block; } + .origin-reminder { + background: lightyellow; + padding: 20px; + margin: 40px; + border: 2px solid black; + display: block; + } + .origin-reminder-tt { + font-weight: normal; + background: yellow; + padding-left: 10px; + padding-right: 10px; + padding-top: 3px; + padding-bottom: 3px; + }
Remember to set this.origin to '*' in app-bridge.ts when using this API demo
+Search for // DEMO-APP: and comment that line back in. + Make sure to comment it out again before you commit.
+Notifications:
diff --git a/src/renderer/app-bridge.ts b/src/renderer/app-bridge.ts index 3b8dda1a..dbb991e8 100644 --- a/src/renderer/app-bridge.ts +++ b/src/renderer/app-bridge.ts @@ -64,6 +64,7 @@ export class AppBridge { const currentWindow = remote.getCurrentWindow(); // @ts-ignore this.origin = currentWindow.origin || ''; + // this.origin = '*'; // DEMO-APP: Comment this line back in only to test demo-app - DO NOT COMMIT if (ssInstance && typeof ssInstance.setBroadcastMessage === 'function') { ssInstance.setBroadcastMessage(this.broadcastMessage); }