I am making an Electron app that when a button is clicked it creates a new window and loads HTML into it, but for some reason the HTML isn't loaded into it and when I toggle developer tools for the window it shows me in the console this error:
"Not allowed to load local resource". It doesn't tell me a specific line.
const electron = require('electron');
const {ipcRenderer} = electron;
const {BrowserWindow} = electron.remote;
// NewTODO window variable
let newTodoWindow;
// Function to call when "New todo" button is clicked
function NewTodo(){
// Creates a NewTODO window
createTodoWindow();
}
function createTodoWindow(){
newTodoWindow = new BrowserWindow({});
newTodoWindow.loadFile("./newTodoWindow.html");
newTodoWindow.setSize(400 , 400);
}
All it needs to do is that when createTodoWindow function is called(And it is called) it would create a new window and load the HTML to it, but it only creates the window without loading the HTML. I am not sure why that goes like and I would really appreciate getting help.