question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

support contextBridge api

See original GitHub issue

Is 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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
matmalkowskicommented, Dec 7, 2020

@musou1500 @Slapbox I think we could support contextBridge in v2, since right now communication is all done with ipc (ipcRenderer & ipcMain only)

2reactions
matmalkowskicommented, Feb 9, 2021

Closing as duplicate of #289, we can continue all discussions in that ticket 👍🏻

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found