Can’t set icon besides `BrowserWindow`’s `title` in Electron like `favicon` is seen in Chrome?

I need to set an icon beside the title of BrowserWindow like favicon is seen in Chrome.

It doesn’t work even if I put it in HTML.

<link rel="icon" type="image/x-icon" href="favicon.ico" />

I tried doing the following as well:

mainWindow = new BrowserWindow({
 width: 1200,
 height: 800,
 icon: path.resolve(__dirname, ‘favicon.ico’)

But it doesn’t work. Is it actually possible?

Note: I am not talking about the app icon. I want an icon beside the title which is beside the traffic lights. For example, if you open VSCode for the 1st time you see Welcome at the top as shown in the image below. I want an icon besides Welcome

Hello, when you program to work in one way, when you generate build and another way.

So when the build is bad you should have a “build” folder inside your project, the electron takes what’s inside, he already knows, just put the icon, .png.

When it is in development you can define as follows

For the MAC and different.