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

javascript - What is the equivalent for app.dock.hide(); - Stack Overflow

programmeradmin3浏览0评论

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 badges
Add a ment  | 

1 Answer 1

Reset to default 17

Mac 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,
    // ...
}
发布评论

评论列表(0)

  1. 暂无评论