Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createWindow() {
let container = desktopJS.resolveContainer({node: true});
desktopJS.ContainerWindow.addListener("window-created", (e) => container.log("info", "Window created - static (ContainerWindow): " + e.windowId + ", " + e.windowName));
desktopJS.ContainerWindow.addListener("window-joinGroup", (e) => container.log("info", "grouped " + JSON.stringify(e)));
desktopJS.ContainerWindow.addListener("window-leaveGroup", (e) => container.log("info", "ungrouped" + JSON.stringify(e)));
snapAssist = new desktopJS.SnapAssistWindowManager(container,
{
windowStateTracking: desktopJS.WindowStateTracking.Main | desktopJS.WindowStateTracking.Group
});
container.createWindow('http://localhost:8000', { name: "desktopJS", main: true }).then(win => mainWindow = win);
let trayIcon = electron.nativeImage.createFromPath(__dirname + '\\..\\web\\favicon.ico');
container.addTrayIcon({ icon: trayIcon, text: 'ContainerPOC' }, () => {
mainWindow.isShowing().then((showing) => {
if (showing) {