support contextBridge api
See original GitHub issueIs your feature request related to a problem? Please describe.
we need to use preload script or nodeIntegration
option to use electron-redux
.
I think preload script is ideal for security perspective.
I often load application hosted on local server while developing(I believe it is common usecase).
but application can not be loaded as preload script in this way.
It requires us to additional branch.
Describe the solution you’d like
I propose to support contextBridge
api.
I am assuming expose simple api that communicate with main process using ipcRenderer
api through contextBridge.
in this way, application on renderer process can use electron-redux
regardless it is loaded through local server or preload script.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
contextBridge - Electron
The contextBridge can be used by the preload script to give your renderer access to Node APIs. The table of supported types described...
Read more >javascript - Electron 'contextBridge' - Stack Overflow
Any data / primitives sent in the API object become immutable and updates on either side of the bridge do not result in...
Read more >electron/context-isolation.md at main - GitHub
The contextBridge module can be used to safely expose APIs from your preload script's isolated context to the context the website is running...
Read more >electron contextBridge TypeScript Examples
This page shows TypeScript code examples of electron contextBridge. ... You may check out the related API usage on the sidebar. Example #1 ......
Read more >Electron: spec-main/api-context-bridge-spec.ts | Fossies
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting...
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
@musou1500 @Slapbox I think we could support contextBridge in v2, since right now communication is all done with ipc (
ipcRenderer
&ipcMain
only)Closing as duplicate of #289, we can continue all discussions in that ticket 👍🏻