Questions tagged [ipcrenderer]
70 questions
0
votes
0 answers
__dirname not defined with: ipcRenderer.on(‘settings’, () => {
I first created a brand new vue.js project with @vue/cli :
vue create newproject
during the creation process, I chose typescipt option.
Then, I installed electron-builder plugin:
vue add electron-builder
executing yarn electron:serve the brand new…

user2315094
- 759
- 3
- 16
- 29
0
votes
2 answers
How to open new window in electron using window.open in renderer process?
I have an angular application which is wrapped as electron app. Now when, in the renderer process I call Window.open for an internal route, I get a message saying Not allowed to load a local resource and a blank window opens. How do I get around…

The mentalist Coder
- 312
- 6
- 21
0
votes
1 answer
How to pass optional callback function to ipcRenderer.on() in ElectronJS
I'm trying to implement something as followed. In the renderer process, I have an async function foo() which takes an optional argument bar as a callback function reference.
After receiving success from the main process (not shown here) and getting…

Shiladitya Bose
- 893
- 2
- 13
- 31
0
votes
1 answer
I don't seem to be able to use ipcRenderer in electron
Using electron 8.0.3 (but the issue is also apparent with 8.1.0). The HTML page loads fine until I use ipcRenderer. Here is the Javascript code which I am including in the page:
const {ipcRenderer} =…

Arc
- 329
- 3
- 11
0
votes
0 answers
Uncaught ReferenceError: require is not defined at filenae.html: (electron)
I am writing a basic web application using electron 6.12.1
Issue i am facing in the script of html file
Uncaught ReferenceError: require is not defined
at addWindow.html:21
(There is two windows 1 is mainWindow.html in which option to open 2nd…
0
votes
0 answers
electron ipcRenderer passing string one letter at a time
I am trying to pass a string from render to main using the ipc process. For some reason its a) firing repeatedly, and b) only sending one letter at a time, even though I can definitively see that the whole string is set before sending. What the heck…

Chris
- 35
- 6
0
votes
1 answer
Is it good approach to call ipc communication in preload script?
I have just started learning electron. I was wondering if it's a good idea to use ipcRenderer calls inside preload script, i.e.:
const sc = require('./StaticContent');
const dc = require('./DynamicContent');
const { ipcRenderer } =…

maialithar
- 3,065
- 5
- 27
- 44
0
votes
0 answers
Why am I unable to send JSON data to the ipcRenderer
In my main.js app.on("ready"), I call a function called runTimer() which contains the following:
const runTimer = function(){
const { net } = require('electron')
setInterval(async function () {
if (seconds == 0) {
const…

floormind
- 1,868
- 5
- 31
- 85
0
votes
0 answers
ipcRenderer.send() function not working inside setInterval
I need explanation and a solution to why the following code isnt working in in my Electron code.
const electron = require("electron");
const ipcRenderer = electron.ipcRenderer;
let seconds = 60;
module.exports = function countdown(){
…

floormind
- 1,868
- 5
- 31
- 85
-1
votes
1 answer
Wait for an answer from Electron synchronously
I'm trying to make a desktop bybit trading app... and I can't figure it out how to make the code wait for the response from the main script..... I need to wait for a response with the needed info for example like wallet balance. Instead the code…

Eugene1111
- 27
- 2
- 7