Tutorial: Window.getNativeId

Window.getNativeId

Returns the native OS level Id. In Windows, it will return the Windows handle.

Example

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

getWindowNativeId().then(nativeId => console.log(nativeId)).catch(err => console.log(err));