Simplify calling the focused window
See original GitHub issueHaving 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?
IssueHunt Summary
ulken has been rewarded.
Backers (Total: $40.00)
issuehunt ($40.00)
Submitted pull Requests
Tips
- Checkout the Issuehunt explorer to discover more funded issues.
- Need some help from other developers? Add your repositories on IssueHunt to raise funds.
IssueHunt has been backed by the following sponsors. Become a sponsor
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Make it easier to focus on tasks - Microsoft Support
Windows offers lots of ways to minimize distractions so it's easier to focus on tasks. You can declutter your taskbar and simplify the...
Read more >Get Focused Window in WPF to front - Stack Overflow
Hi Steven I have used the Show() method to open the Dialog Window but it dosent make any difference. The only thing is...
Read more >How to Prevent Programs From Stealing Focus in Windows
Follow these steps to stop programs from popping up in front of other ones, called "stealing focus." This should never happen.
Read more >Window focus() Method - W3Schools
The focus() method makes a request to bring a window to the front. It may not work as you expect, due to different...
Read more >Window pops up in background, how to make active? #1077
Under certain circumstances, when I create a window, it gets created in the background and doesn't have focus.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@sindresorhus has rewarded $36.00 to @ulken. See it on IssueHunt
I went ahead and did it anyhow. Hope it will bring you any value 😃