I currently working on an electron tray application. For Mac, the electron framework has a function for hiding the app in the dock.
app.dock.hide();
I try to run this on a Windows machine and get an error.
TypeError: Cannot read property 'hide' of undefined
Now I am looking for an equivalent functionality for Windows to hide the app in the taskbar.
I currently working on an electron tray application. For Mac, the electron framework has a function for hiding the app in the dock.
app.dock.hide();
I try to run this on a Windows machine and get an error.
TypeError: Cannot read property 'hide' of undefined
Now I am looking for an equivalent functionality for Windows to hide the app in the taskbar.
Share Improve this question asked Sep 22, 2017 at 11:53 PommeslochPommesloch 5025 silver badges17 bronze badges1 Answer
Reset to default 17Mac OS X is application-oriented, whereas Windows is window-oriented...
app.dock.hide ()
Is indeed tagged as macOS only.
In order to make the window not show in the taskbar, you can either call:
win.setSkipTaskbar (true);
Or add skipTaskbar
to the options passed to the new BrowserWindow:
{
// ...
skipTaskbar: true,
// ...
}