Import Menu is undefined in render script #457
Unanswered
surajvofox
asked this question in
Q&A
Replies: 1 comment
-
Preload script give you access to node.js api (like So, you need to send message to Main process and call Menu there. See example in docs. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
Platform(Mac os)
I tried to access the Electron Menu in the render script.I used the preload for that. so i tried to import the menu from the electron api. but it was empty when i log it with in the preload script itself.
Next i tired to enable the remoteModule in the webprefrence, and tried to access the menu in the preload from remote.when i console it it showing the menu init, but when i tried to pass that to render script and console it in the render, its still don't have the menu . I tried to console log remote in the render script but it has only minimum methods only. and Menu was not there.
Below is the image which shows when i console. the remote. from render script.
Below is the image that i consoled from the preload script which consist all the methods , when i tried to pass the menu only from the preload script to render script still its not working. showing menu is undefined
Beta Was this translation helpful? Give feedback.
All reactions