Electron (software framework): Difference between revisions

Content deleted Content added
ref req; minor clarif
AnomieBOT (talk | contribs)
m Dating maintenance tags: {{Fact}}
Line 25:
 
== Architecture ==
Electron applications include a "main" process and several "renderer" processes. The main process runs the logic for the application (e.g., menus, shell commands, lifecycle events), and can then launch multiple renderer processes by instantiating an instance of the {{code|BrowserWindow|javascript|style=font-weight: bold; color: green;}} class, which loads a window that appears on the screen by rendering [[HTML]] and [[CSS]].{{fact|date=October 2024}}
 
Both the main and renderer processes can run with [[Node.js]] integration if the {{code|nodeIntegration}} field in the main process is set to {{code|true|javascript}}.{{fact|date=October 2024}}
 
Most of Electron's APIs are written in [[C++]] or [[Objective-C]] and are exposed directly to the application code through [[JavaScript]] bindings.<ref>{{Cite web|url=https://electronjs.org/blog/from-native-to-js|title=From native to JavaScript in Electron {{!}} Electron Blog|website=electronjs.org|date=19 March 2019|access-date=2019-04-26|archive-date=26 April 2019|archive-url=https://web.archive.org/web/20190426032159/https://electronjs.org/blog/from-native-to-js|url-status=live}}</ref>