-
-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught TypeError: Illegal constructor and Cannot read properties of null #2333
Comments
When creating your browser window, you need to set the const win = new BrowserWindow({
width: 800,
height: 600,
sandbox: false,
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
preload: path.join(__dirname, "preload.js"),
},
}); |
Thanks, got further, now crashes when trying to set up event listeners for the virtual keyboard
|
Also
When trying to use the input box that gets created |
Great to hear you're making some progress. Unfortunately, I had never used Electron until investigating this report. With a big of googling I was able to offer the suggestions above. However, it seems to me that there's no reason why a mathfield wouldn't work in an Electron context, but that Electron has to be configured correctly to use web components. It sounds like there might be more adjustments needed to get the full functionality of mathfields. I would suggest the following:
If there is indeed something that needs to be fixed in MathLive, don't hesitate to file an issue and I'd be happy to investigate. |
Thank you very much for your time and effort, will do :) |
Figured it out, elecron needs to be configured as you have sent and the |
Great! Thanks for letting me know. |
You can close this now as resolved :D |
Code fragment:
Runtime error:
Uncaught TypeError: Illegal constructor at new re (VM770 mathlive.min.js:3057:4258)
Used in: electron, preload.js (after DOM has loaded)
Description
I installed the
mathlive
npm package - version 0.98.6Added the demo code found in docs.
Steps to Reproduce
npm install --save mathlive
preload.js
Actual Behavior
Error
Expected Behavior
No error
Environment
mathlive: 0.98.6
MathLive version: 0.98.6
Operating System Linux - Pop!_OS 22.04 LTS x86_64
Browser Electron based chromium - electron version: ^29.1.6
The text was updated successfully, but these errors were encountered: