sindresorhus
electron-better-ipc

https://github.com/sindresorhus/electron-better-ipc
Go to Github

Simplified IPC communication for Electron apps

https://github.com/sindresorhus/electron-better-ipc/issues/2Go to Github

FundedView inSimplify calling the focused window#2

sindresorhuscreated this issue 13 days ago

Having to do this every time is slightly inconvenient:

const win = electron.BrowserWindow.getFocusedWindow();

(async () => {
    const emoji = await ipc.callRenderer(win, 'get-emoji', 'unicorn');
    console.log(emoji);
    //=> '🦄'
})();

I'm thinking something like:

(async () => {
    const emoji = await ipc.callFocusedRenderer('get-emoji', 'unicorn');
    console.log(emoji);
    //=> '🦄'
})();

Thoughts?

Logs

Amount funded

$40.00

Resolve this issue and earn $36.00

Fund this issue

Fund as

Payment method

Amount(USD)

Please sign in first to fund this issue

Sign in with

Pull requests

0

    Submit

    URL of your pull request

    Submit your pull request

    Please sign in first to submit a pull request

    Sign in with