Remove remote event callbacks once template is updated to Electron v14
See original GitHub issueAll of the app.on
calls in main.js
here are using deprecated calls - are these necessary anymore?
When I convert the main.js file to a .ts file instead, it allows us to pickup electron.d.ts where these calls are marked as deprecated:
/**
* Emitted when `remote.getGlobal()` is called in the renderer process of
* `webContents`. Calling `event.preventDefault()` will prevent the global from
* being returned. Custom value can be returned by setting `event.returnValue`.
*
* @deprecated
*/
on(event: 'remote-get-global', listener: (event: Event,
webContents: WebContents,
globalName: string) => void): this;
once(event: 'remote-get-global', listener: (event: Event,
webContents: WebContents,
globalName: string) => void): this;
addListener(event: 'remote-get-global', listener: (event: Event,
webContents: WebContents,
globalName: string) => void): this;
removeListener(event: 'remote-get-global', listener: (event: Event,
webContents: WebContents,
globalName: string) => void): this
Per this Github issue, the remote module has been removed. Should this code also be removed from main? Is it safe to remove this code?
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Breaking Changes
The new-window event of WebContents has been removed. ... The remote module was deprecated in Electron 12, and will be removed in Electron...
Read more >How to unregister events in electron?
Hi, i m new to electron, if it is the same EventEmitter as nodejs, once method can handle that easily. nodejs.org/api/events.html# ...
Read more >Release Notes
Rock v14.0 Released October 12, 2022. Rock McKinley 14.0 fixes issues that were reported during the previous release(s) and introduces a variety of...
Read more >Node.js v19.3.0 Documentation
The callbacks init() / before() / after() / destroy() are called for the respective asynchronous event during a resource's lifetime. All callbacks are...
Read more >ServiceDesk Plus readme, release notes, and version history
SD-106483 : API doc tool is now updated with get, add and remove task ... Description field of a change template are not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Turtus / @netpoetica the latest version of this template will fix this issue. Please re-open this issue if you encounter any problems.
@Turtus it looks like the upgrade is failing due to the
additionalArguments
I’m using for the store module within this template. I’ve opened an issue at the electron repo.