Tutorial: Window.getCurrentSync

Window.getCurrentSync

Synchronously returns a Window object that represents the current window

Example

async function getCurrentWindowBounds () {
    const win = fin.Window.getCurrent();

    return win.getBounds();
}

getCurrentWindowBounds().then(bounds => {
    console.log('the current window bounds are:');
    console.log(bounds);
}).catch(err => {
    console.error(err);
});