How to use @morgan-stanley/desktopjs - 5 common examples

To help you get started, we’ve selected a few @morgan-stanley/desktopjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Morgan-Stanley / desktopJS / examples / electron / electron.js View on Github external
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) {
                mainWindow.hide();
            } else {
                mainWindow.show();
            }
        });
    }, [{ label: "Exit", click: (menuItem) => app.quit() }]);

	container.ipc.subscribe("stock.selected", function (event, message) {
github Morgan-Stanley / desktopJS / examples / electron / electron.js View on Github external
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) {
                mainWindow.hide();
            } else {
                mainWindow.show();
            }
        });
    }, [{ label: "Exit", click: (menuItem) => app.quit() }]);
github Morgan-Stanley / desktopJS / examples / electron / electron.js View on Github external
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) {
                mainWindow.hide();
            } else {
github Morgan-Stanley / desktopJS / examples / electron / electron.js View on Github external
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) {
                mainWindow.hide();
            } else {
                mainWindow.show();
github Morgan-Stanley / desktopJS / examples / electron / electron.js View on Github external
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) {

@morgan-stanley/desktopjs

Library for abstracting common container hosting

Apache-2.0
Latest version published 1 year ago

Package Health Score

67 / 100
Full package analysis