Lesson 22 of 28
javascriptElectron Architecture – Main vs Renderer
9 mins
Course progress79%
What you'll learn
Keep these ideas in mind as you work through the lesson.
Lesson 22 of 28
javascript9 mins
Keep these ideas in mind as you work through the lesson.
BrowserWindow gets its own renderer. It cannot directly require Node modules unless you enable nodeIntegration (which is not recommended for security).contextBridge.flowchart LR
Main[Main Process (Node)] -->|creates| Browser[BrowserWindow]
Browser -->|loads| Renderer[Renderer Process (Chromium)]
Main -->|exposes via| Preload[Preload Script]
Renderer -->|calls| Bridge[contextBridge API]