jadraptor
jadraptor

Reputation: 55

How to change window icon in electron after browser 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.

Upvotes: 2

Views: 6222

Answers (1)

Joshua
Joshua

Reputation: 5322

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

setIcon Docs

Upvotes: 7

Related Questions