在 electron app.ready() 之前调用了哪个方法

Which method called before app.ready() in electron

const { app } = require('electron')

我想在 app.ready()

之前调用 app.disableHardwareAcceleration()

你可以调用 app.disableHardwareAcceleration()

const {app, BrowserWindow} = require("electron");

app.disableHardwareAcceleration();

app.on("ready", () => {
    const window = new BrowserWindow({
        width: 800,
        height: 600,
    });

    window.loadURL("about:blank");
});

ElectronJS 有事件 "will-finish-launching"。这将在应用程序完成基本启动时调用。

app.on('will-finish-launching', () => { ... })