Merge pull request #13 from lneir/api-name-change

change name of api
This commit is contained in:
Lynn
2017-02-13 09:05:13 -08:00
committed by GitHub
2 changed files with 8 additions and 6 deletions

View File

@@ -17,8 +17,9 @@ const local = {
ipcRenderer: ipcRenderer ipcRenderer: ipcRenderer
} }
// JS can detect if in wrapper mode by looking for window.ELECTRON_API obj // JS can detect if in wrapper mode by looking for window.SYM_API obj
window.ELECTRON_API = { // API exposes by Symphony to a child window:
window.SYM_API = {
}; };
Object.freeze(window.ELECTRON_API); Object.freeze(window.SYM_API);

View File

@@ -17,8 +17,9 @@ const local = {
ipcRenderer: ipcRenderer ipcRenderer: ipcRenderer
} }
// JS can detect if in wrapper mode by looking for window.ELECTRON_API obj // JS can detect if in container mode by looking for window.SYM_API obj
window.ELECTRON_API = { // API exposes by Symphony to main window:
window.SYM_API = {
openWindow: function(url) { openWindow: function(url) {
local.ipcRenderer.send('symphony-msg', { local.ipcRenderer.send('symphony-msg', {
cmd: 'open', cmd: 'open',
@@ -27,4 +28,4 @@ window.ELECTRON_API = {
} }
}; };
Object.freeze(window.ELECTRON_API); Object.freeze(window.SYM_API);