Tutorial: Window.getState

Window.getState

Gets the current state ("minimized", "maximized", or "restored") of the window

Example

async function getWindowState() {
    const app = await fin.Application.create({
        name: 'myApp',
        uuid: 'app-1',
        url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.getState.html',
        autoShow: true
    });
    await app.run();
    const win = await app.getWindow();
    return await win.getState();
}

getWindowState().then(winState => console.log(winState)).catch(err => console.log(err));