最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to change window icon in electron after browser is open? - Stack Overflow

programmeradmin4浏览0评论

I don't know if this is possible, but I figured I'd ask.

After my electron app opens a browser window and is displaying some icon in the taskbar and in its title bar for the window, can I change one or both of those icons while the browser is open? I suspect the answer is a hard no, but I thought it'd be cool if I could make it react in some way.

The search terms I came up with were mostly leading me to answers for how to change the icon before the window is open.

I don't know if this is possible, but I figured I'd ask.

After my electron app opens a browser window and is displaying some icon in the taskbar and in its title bar for the window, can I change one or both of those icons while the browser is open? I suspect the answer is a hard no, but I thought it'd be cool if I could make it react in some way.

The search terms I came up with were mostly leading me to answers for how to change the icon before the window is open.

Share Improve this question asked Aug 30, 2018 at 12:17 jadraptorjadraptor 552 silver badges8 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

Yes, you can use win.setIcon('/path/to/icon.png'); to change the window icon.

setIcon Docs

发布评论

评论列表(0)

  1. 暂无评论