小编Gre*_* R.的帖子

How do you force an electron app to have a single instance?

I'm trying to keep my electron app from being able to start more than one window at a time. I've already tried this, but it makes the first window opened close itself instead of the second window opened, and it completely stops working for the third window:

app.requestSingleInstanceLock();
app.on('second-instance', () => {
    app.quit();
});
Run Code Online (Sandbox Code Playgroud)

The older app.makeSingleInstance also throws an error since it's deprecated. What should I do instead?

javascript electron

5
推荐指数
1
解决办法
1583
查看次数

如何在 Visual Studio Code 中隐藏缩进箭头?

我最近打开 vscode,当我突出显示缩进时看到这个箭头出现。
我认为这与我使用的字体有关。我该如何隐藏它?

所选缩进中的箭头

visual-studio-code

4
推荐指数
1
解决办法
4640
查看次数

标签 统计

electron ×1

javascript ×1

visual-studio-code ×1