loadUrl is not working in electron
现象
I tried to run the index.js with following lines, it worked
1 | const electron = require("electron") |
but when i tried to add this line,
1 | mainWindow.loadUrl('file://${ __dirname}/index.html') |
it return an error typeError:mainWindow.loadUrl is not a function
解决
1 | loadUrl() was renamed to loadURL() a while back. |