Electron.NET
Electron.NET copied to clipboard
Option to run custom code inside main.js
Today we don't have access to main.js which is the entry point for the electron app and where it starts the asp.net executable. It would be great if we had a way to maybe specify a path to a js file in the manifest where will be executed inside the main.js file.
The main reason for this is that I need to disable error dialogs so it won't stop the execution.
The code to disable the error dialogs is this:
const electron = require('electron');
const dialog = electron.dialog;
// Disable error dialogs by overriding
dialog.showErrorBox = function(title, content) {
console.log(`${title}\n${content}`);
};
I need to have access to the electron.dialog but this is only available from the main.js file and not from the proxy where it'll only be available as electron.remote.dialog which is useless for this.
or maybe just a feature to disable error box and console.error/log instead? do you know of any workaround to have this possible right now?
@lukasportal did you find a solution to this?
🎉🚀 New Electron.NET version 23.6.1 released 🚀🎉
With native Electron 23 and .NET 6 support. Your problem should be fixed here. If you continue to have the problem, please let us know. Please note the correct updating of your API & CLI. Info in the README. Have fun!