change name of api

This commit is contained in:
Lynn Neir 2017-02-13 09:04:16 -08:00
parent 21de6cebe7
commit ab21a62a78
2 changed files with 8 additions and 6 deletions

View File

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