mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
Reference in New Issue
Block a user