How to use the active-win function in active-win

To help you get started, we’ve selected a few active-win 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 EasyWebApp / puppeteer-browser / test / index.js View on Github external
async function isActiveWindow(page,  yes = true) {

    const assert = yes ? equal : notEqual;

    const window = await activeWin(), path = PuppeteerBrowser.executablePath();

    if ( window.owner.path )
        assert(path, window.owner.path);
    else
        assert(path.match( /([^/]+)(\.\w+)?$/ )[1],  window.owner.name);
}

active-win

Get metadata about the active window and open windows (title, id, bounds, owner, URL, etc)

MIT
Latest version published 5 days ago

Package Health Score

56 / 100
Full package analysis

Popular active-win functions