You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to Electron and encountered an issue with the invoke method in the preload.ts file of a quick-start template. When I called the encapsulated invoke method from the renderer process, I didn't receive a response.
Expected Behavior
The invoke method should return a Promise, allowing the renderer process to receive the promised value from the main process.
Actual Behavior
The invoke method does not return anything, which means the renderer process is unable to receive the resolved value from the main process.
Question
Is this an oversight in the template or by design for some reason? If it's an oversight, the return statement should be included to ensure the invoke method works as intended according to the Electron documentation.
The text was updated successfully, but these errors were encountered:
Issue
I am new to Electron and encountered an issue with the
invoke
method in thepreload.ts
file of a quick-start template. When I called the encapsulatedinvoke
method from the renderer process, I didn't receive a response.Original code:
However, when I added a return statement to the method, it started working as expected:
Expected Behavior
The invoke method should return a Promise, allowing the renderer process to receive the promised value from the main process.
Actual Behavior
The invoke method does not return anything, which means the renderer process is unable to receive the resolved value from the main process.
Question
Is this an oversight in the template or by design for some reason? If it's an oversight, the return statement should be included to ensure the invoke method works as intended according to the Electron documentation.
The text was updated successfully, but these errors were encountered: