1---2name: electron3description: Build cross-platform desktop apps with JavaScript, HTML, and CSS. Use when building or maintaining Electron apps, configuring IPC/security, or packaging and distributing.4---5
6Electron embeds Chromium and Node.js so you can ship one JavaScript codebase for Windows, macOS, and Linux. Use these skills when scaffolding projects, wiring main/renderer IPC, configuring security and packaging, or integrating native modules and auto-updates.
7
8> The skill is based on Electron (latest), generated at 2026-01-30.
9
10## Core References
11
12| Topic | Description | Reference |
13|-------|-------------|-----------|
14| Process Model | Main, renderer, preload, utility process; when to use each | [core-process-model](references/core-process-model.md) |
15| IPC | Renderer↔main patterns (send, invoke, main→renderer), serialization | [core-ipc](references/core-ipc.md) |
16| Context Isolation | contextBridge, exposing safe APIs from preload | [core-context-isolation](references/core-context-isolation.md) |
17| Sandbox | Process sandboxing, preload polyfill, when it is disabled | [core-sandbox](references/core-sandbox.md) |
18
19## Develop
20
21| Topic | Description | Reference |
22|-------|-------------|-----------|
23| Accessibility | setAccessibilitySupportEnabled, assistive tech, AXManualAccessibility | [develop-accessibility](references/develop-accessibility.md) |
24| App Lifecycle | whenReady, window-all-closed, quit, single instance lock | [develop-app-lifecycle](references/develop-app-lifecycle.md) |
25| BaseWindow | Multi-view windows; contentView, View, addChildView; parent/modal | [develop-base-window](references/develop-base-window.md) |
26| BrowserWindow | Creating windows, loadURL/loadFile, ready-to-show, webPreferences | [develop-browser-window](references/develop-browser-window.md) |
27| Clipboard | readText/writeText, readHTML/writeHTML; use from preload | [develop-clipboard](references/develop-clipboard.md) |
28| Cookies | session.cookies; get, set, remove, flushStore; changed event | [develop-cookies](references/develop-cookies.md) |
29| Command Line | app.commandLine, appendSwitch, hasSwitch; Electron/Node/Chromium flags | [develop-command-line](references/develop-command-line.md) |
30| Context Menu | Right-click menu; webContents context-menu, Menu.popup | [develop-context-menu](references/develop-context-menu.md) |
31| contentTracing | Chromium tracing; startRecording, stopRecording; chrome://tracing | [develop-content-tracing](references/develop-content-tracing.md) |
32| Crash Reporter | crashReporter.start, submitURL, extra; call before ready | [develop-crash-reporter](references/develop-crash-reporter.md) |
33| Debug | Renderer DevTools, main process (--inspect, Chrome/VSCode) | [develop-debug](references/develop-debug.md) |
34| Debugger (CDP) | webContents.debugger; attach, detach, sendCommand; DevTools Protocol | [develop-debugger](references/develop-debugger.md) |
35| DevTools Extension | loadExtension, removeExtension; electron-devtools-installer | [develop-devtools-extension](references/develop-devtools-extension.md) |
36| Dialog | showOpenDialog, showSaveDialog, showMessageBox; expose via IPC | [develop-dialog](references/develop-dialog.md) |
37| Dock | macOS Dock; bounce, badge, icon, menu, hide/show | [develop-dock](references/develop-dock.md) |
38| Downloads | will-download, DownloadItem, setSavePath, preventDefault | [develop-downloads](references/develop-downloads.md) |
39| Keyboard Shortcuts | Accelerators, local (MenuItem), global (globalShortcut) | [develop-keyboard-shortcuts](references/develop-keyboard-shortcuts.md) |
40| Linux Desktop Actions | .desktop file Actions; launcher shortcuts; process.argv | [develop-linux-desktop-actions](references/develop-linux-desktop-actions.md) |
41| Menus and Tray | Application/context/tray/dock menus; Tray icon and context menu | [develop-menus-tray](references/develop-menus-tray.md) |
42| Native Image | createFromPath, createFromBuffer, template image; tray, icon | [develop-native-image](references/develop-native-image.md) |
43| Native Modules | Using native Node addons; @electron/rebuild, node-gyp | [develop-native-modules](references/develop-native-modules.md) |
44| Net | net.fetch, net.request; HTTP from main (Chromium stack) | [develop-net](references/develop-net.md) |
45| netLog | Session network logging; startLogging, stopLogging, captureMode | [develop-net-log](references/develop-net-log.md) |
46| Drag and Drop | Native file drag out; webContents.startDrag, IPC | [develop-drag-drop](references/develop-drag-drop.md) |
47| ESM | ES modules in main and preload; .mjs, caveats | [develop-esm](references/develop-esm.md) |
48| Multithreading | Web Workers, nodeIntegrationInWorker; no Electron in workers | [develop-multithreading](references/develop-multithreading.md) |
49| Navigation History | webContents.navigationHistory, goBack, goForward, getAllEntries | [develop-navigation-history](references/develop-navigation-history.md) |
50| Offscreen Rendering | paint event, NativeImage; GPU vs software; setFrameRate | [develop-offscreen-rendering](references/develop-offscreen-rendering.md) |
51| parentPort | Utility process child; process.parentPort message/postMessage | [develop-parent-port](references/develop-parent-port.md) |
52| Power Monitor | suspend, resume, battery/AC, thermal-state-change, shutdown | [develop-power-monitor](references/develop-power-monitor.md) |
53| Power Save Blocker | powerSaveBlocker; prevent display/app sleep; start/stop by id | [develop-power-save-blocker](references/develop-power-save-blocker.md) |
54| Progress Bar | setProgressBar (taskbar/dock); 0–1, indeterminate | [develop-progress-bar](references/develop-progress-bar.md) |
55| Protocol | Custom protocol (protocol.handle), registerSchemesAsPrivileged | [develop-protocol](references/develop-protocol.md) |
56| Recent Documents | addRecentDocument, clearRecentDocuments; JumpList, Dock | [develop-recent-documents](references/develop-recent-documents.md) |
57| Safe Storage | encryptString, decryptString; OS keychain | [develop-safe-storage](references/develop-safe-storage.md) |
58| Screen | getPrimaryDisplay, getAllDisplays, workAreaSize, display events | [develop-screen](references/develop-screen.md) |
59| Session | partition, defaultSession, permissionRequestHandler, cookies | [develop-session](references/develop-session.md) |
60| Share Menu | macOS ShareMenu; share to apps/social; popup, shareMenu role | [develop-share-menu](references/develop-share-menu.md) |
61| Shell | openExternal, openPath, showItemInFolder, trashItem; security | [develop-shell](references/develop-shell.md) |
62| Process | process.type, process.versions, process.platform, process.mas | [develop-process](references/develop-process.md) |
63| Environment Variables | ELECTRON_*, NODE_OPTIONS; fuses | [develop-environment-variables](references/develop-environment-variables.md) |
64| Represented File | setRepresentedFilename, setDocumentEdited (macOS title bar) | [develop-represented-file](references/develop-represented-file.md) |
65| System Preferences | getEffectiveAppearance, getColor, getMediaAccessStatus | [develop-system-preferences](references/develop-system-preferences.md) |
66| Touch Bar | macOS TouchBar; items (Button, Label, Slider, etc.), setTouchBar | [develop-touch-bar](references/develop-touch-bar.md) |
67| Tests | WebDriver/WebdriverIO E2E, headless CI | [develop-tests](references/develop-tests.md) |
68| Utility Process | utilityProcess.fork, postMessage, MessagePortMain | [develop-utility-process](references/develop-utility-process.md) |
69| Web Request | onBeforeRequest, onHeadersReceived, filter; set CSP | [develop-web-request](references/develop-web-request.md) |
70| webContents Navigation | will-navigate, setWindowOpenHandler, load events | [develop-webcontents-navigation](references/develop-webcontents-navigation.md) |
71| webFrame | Renderer zoom, insertCSS, executeJavaScript, spell check, frame tree | [develop-web-frame](references/develop-web-frame.md) |
72| webFrameMain | Main process frame control; fromId/fromFrameToken, executeJavaScript, IPC | [develop-web-frame-main](references/develop-web-frame-main.md) |
73| webUtils | Renderer getPathForFile(File); file input path; expose via preload | [develop-web-utils](references/develop-web-utils.md) |
74| Window Customization | Frameless, transparent, custom title bar | [develop-window-customization](references/develop-window-customization.md) |
75| Windows Taskbar | JumpList, setThumbarButtons, setOverlayIcon, flashFrame | [develop-windows-taskbar](references/develop-windows-taskbar.md) |
76
77## Best Practices
78
79| Topic | Description | Reference |
80|-------|-------------|-----------|
81| Performance | Measure first, defer loading, avoid blocking, bundle | [best-practices-performance](references/best-practices-performance.md) |
82| Security | Content loading, webPreferences, CSP, IPC validation, distribution | [best-practices-security](references/best-practices-security.md) |
83| Versioning | SemVer, ~ vs ^, stabilization branches, upgrade and EOL | [best-practices-versioning](references/best-practices-versioning.md) |
84
85## Features
86
87| Topic | Description | Reference |
88|-------|-------------|-----------|
89| ASAR | Pack/unpack, Node and Web API usage, unpack option, integrity | [features-asar](references/features-asar.md) |
90| Corner Smoothing | -electron-corner-smoothing CSS; smooth rounded corners; system-ui | [features-corner-smoothing](references/features-corner-smoothing.md) |
91| Dark Mode | nativeTheme, themeSource, prefers-color-scheme | [features-dark-mode](references/features-dark-mode.md) |
92| Desktop Capture | desktopCapturer, setDisplayMediaRequestHandler, getDisplayMedia | [features-desktop-capture](references/features-desktop-capture.md) |
93| Fuses | runAsNode, nodeCliInspect, asar integrity; @electron/fuses | [features-fuses](references/features-fuses.md) |
94| In-App Purchase | Mac App Store IAP; purchaseProduct, getProducts, transactions-updated | [features-in-app-purchase](references/features-in-app-purchase.md) |
95| MessagePorts | Renderer-to-renderer and main-renderer messaging; MessagePortMain | [features-message-ports](references/features-message-ports.md) |
96| Notifications | Main (Notification), renderer (Web Notifications API) | [features-notifications](references/features-notifications.md) |
97| Online/Offline | net.isOnline(), net.online; navigator.onLine, online/offline events | [features-online-offline](references/features-online-offline.md) |
98| Push Notifications | APNS (macOS); registerForAPNSNotifications, received-apns-notification | [features-push-notifications](references/features-push-notifications.md) |
99| Service Workers | session.serviceWorkers; getAllRunning, main↔SW IPC (IpcMainServiceWorker) | [features-service-workers](references/features-service-workers.md) |
100| Spellchecker | Enable, setSpellCheckerLanguages, context menu, dictionary URL | [features-spellchecker](references/features-spellchecker.md) |
101| Updates | autoUpdater, Squirrel, publishing release metadata | [features-updates](references/features-updates.md) |
102| Web Embeds | iframe, WebContentsView, webview tag; when to use each | [features-web-embeds](references/features-web-embeds.md) |
103
104## Distribute
105
106| Topic | Description | Reference |
107|-------|-------------|-----------|
108| Code Signing | macOS sign + notarize; Windows Authenticode | [distribute-code-signing](references/distribute-code-signing.md) |
109| Mac App Store | MAS build, Apple Distribution, sandbox, limitations | [distribute-mac-app-store](references/distribute-mac-app-store.md) |
110| Packaging | Tooling (Forge), manual layout, asar, rebranding | [distribute-packaging](references/distribute-packaging.md) |
111| Windows Store | AppX/MSIX, electron-windows-store, process.windowsStore | [distribute-windows-store](references/distribute-windows-store.md) |