Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js Electron:在加载时(在同一窗口中)更改页面(html)而不显示白色屏幕_Node.js_Electron - Fatal编程技术网

Node.js Electron:在加载时(在同一窗口中)更改页面(html)而不显示白色屏幕

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"),

我想知道是否有一种方法可以加载一个html页面(在同一窗口中的页面之间导航),而不会出现闪烁的白色屏幕,“ready to show”(准备显示)方法似乎不适合我

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");
});