Node.js Electron:在加载时(在同一窗口中)更改页面(html)而不显示白色屏幕
我想知道是否有一种方法可以加载一个html页面(在同一窗口中的页面之间导航),而不会出现闪烁的白色屏幕,“ready to show”(准备显示)方法似乎不适合我Node.js Electron:在加载时(在同一窗口中)更改页面(html)而不显示白色屏幕,node.js,electron,Node.js,Electron,我想知道是否有一种方法可以加载一个html页面(在同一窗口中的页面之间导航),而不会出现闪烁的白色屏幕,“ready to show”(准备显示)方法似乎不适合我 var win2 = remote.getCurrentWindow({ backgroundColor: "#578985", show: false }); win2.loadURL( url.format({ pathname: path.join(__dirname, "./all-student.html"),
var win2 = remote.getCurrentWindow({ backgroundColor: "#578985", show: false });
win2.loadURL(
url.format({
pathname: path.join(__dirname, "./all-student.html"),
protocol: "file",
slashes: true,
})
);
win2.once("ready-to-show", function () {
win2.show();
console.log("not showing");
});