2016-11-03 23:53:40 +03:00
|
|
|
|
# Glossary
|
|
|
|
|
|
|
|
|
|
This page defines some terminology that is commonly used in Electron development.
|
|
|
|
|
|
2016-11-04 21:28:59 +03:00
|
|
|
|
### ASAR
|
2016-11-03 23:53:40 +03:00
|
|
|
|
|
2023-01-16 12:22:49 +03:00
|
|
|
|
ASAR stands for Atom Shell Archive Format. An [asar][] archive is a simple
|
2016-11-03 23:53:40 +03:00
|
|
|
|
`tar`-like format that concatenates files into a single file. Electron can read
|
|
|
|
|
arbitrary files from it without unpacking the whole file.
|
|
|
|
|
|
2021-09-22 02:52:24 +03:00
|
|
|
|
The ASAR format was created primarily to improve performance on Windows when
|
|
|
|
|
reading large quantities of small files (e.g. when loading your app's JavaScript
|
|
|
|
|
dependency tree from `node_modules`).
|
|
|
|
|
|
|
|
|
|
### code signing
|
|
|
|
|
|
|
|
|
|
Code signing is a process where an app developer digitally signs their code to
|
|
|
|
|
ensure that it hasn't been tampered with after packaging. Both Windows and
|
|
|
|
|
macOS implement their own version of code signing. As a desktop app developer,
|
|
|
|
|
it's important that you sign your code if you plan on distributing it to the
|
|
|
|
|
general public.
|
|
|
|
|
|
2023-01-16 12:22:49 +03:00
|
|
|
|
For more information, read the [Code Signing][] tutorial.
|
2021-09-22 02:52:24 +03:00
|
|
|
|
|
|
|
|
|
### context isolation
|
|
|
|
|
|
|
|
|
|
Context isolation is a security measure in Electron that ensures that your
|
|
|
|
|
preload script cannot leak privileged Electron or Node.js APIs to the web
|
|
|
|
|
contents in your renderer process. With context isolation enabled, the
|
|
|
|
|
only way to expose APIs from your preload script is through the
|
|
|
|
|
`contextBridge` API.
|
|
|
|
|
|
2023-01-16 12:22:49 +03:00
|
|
|
|
For more information, read the [Context Isolation][] tutorial.
|
2021-09-22 02:52:24 +03:00
|
|
|
|
|
|
|
|
|
See also: [preload script](#preload-script), [renderer process](#renderer-process)
|
2016-11-03 23:53:40 +03:00
|
|
|
|
|
2017-06-16 03:28:00 +03:00
|
|
|
|
### CRT
|
|
|
|
|
|
2021-09-22 02:52:24 +03:00
|
|
|
|
The C Runtime Library (CRT) is the part of the C++ Standard Library that
|
2017-11-29 13:58:24 +03:00
|
|
|
|
incorporates the ISO C99 standard library. The Visual C++ libraries that
|
|
|
|
|
implement the CRT support native code development, and both mixed native and
|
2017-06-16 20:21:24 +03:00
|
|
|
|
managed code, and pure managed code for .NET development.
|
2017-06-16 03:28:00 +03:00
|
|
|
|
|
2016-11-06 06:07:36 +03:00
|
|
|
|
### DMG
|
|
|
|
|
|
|
|
|
|
An Apple Disk Image is a packaging format used by macOS. DMG files are
|
2021-09-22 02:52:24 +03:00
|
|
|
|
commonly used for distributing application "installers".
|
2016-11-06 06:07:36 +03:00
|
|
|
|
|
2017-06-26 20:04:46 +03:00
|
|
|
|
### IME
|
|
|
|
|
|
2017-11-29 13:58:24 +03:00
|
|
|
|
Input Method Editor. A program that allows users to enter characters and
|
|
|
|
|
symbols not found on their keyboard. For example, this allows users of Latin
|
2017-06-26 20:04:46 +03:00
|
|
|
|
keyboards to input Chinese, Japanese, Korean and Indic characters.
|
|
|
|
|
|
2018-04-03 15:58:25 +03:00
|
|
|
|
### IDL
|
|
|
|
|
|
2021-09-22 02:52:24 +03:00
|
|
|
|
Interface description language. Write function signatures and data types in a
|
|
|
|
|
format that can be used to generate interfaces in Java, C++, JavaScript, etc.
|
2018-04-03 15:58:25 +03:00
|
|
|
|
|
2016-11-04 21:28:59 +03:00
|
|
|
|
### IPC
|
2016-11-03 23:53:40 +03:00
|
|
|
|
|
2021-09-22 02:52:24 +03:00
|
|
|
|
IPC stands for inter-process communication. Electron uses IPC to send
|
|
|
|
|
serialized JSON messages between the main and renderer processes.
|
2017-08-01 20:58:33 +03:00
|
|
|
|
|
2021-09-22 02:52:24 +03:00
|
|
|
|
see also: [main process](#main-process), [renderer process](#renderer-process)
|
2016-11-03 23:53:40 +03:00
|
|
|
|
|
2016-11-04 21:28:59 +03:00
|
|
|
|
### main process
|
2016-11-03 23:53:40 +03:00
|
|
|
|
|
|
|
|
|
The main process, commonly a file named `main.js`, is the entry point to every
|
|
|
|
|
Electron app. It controls the life of the app, from open to close. It also
|
2017-11-29 13:58:24 +03:00
|
|
|
|
manages native elements such as the Menu, Menu Bar, Dock, Tray, etc. The
|
2016-11-03 23:53:40 +03:00
|
|
|
|
main process is responsible for creating each new renderer process in the app.
|
|
|
|
|
The full Node API is built in.
|
|
|
|
|
|
|
|
|
|
Every app's main process file is specified in the `main` property in
|
|
|
|
|
`package.json`. This is how `electron .` knows what file to execute at startup.
|
|
|
|
|
|
2017-09-22 04:52:43 +03:00
|
|
|
|
In Chromium, this process is referred to as the "browser process". It is
|
|
|
|
|
renamed in Electron to avoid confusion with renderer processes.
|
|
|
|
|
|
2016-12-22 00:47:17 +03:00
|
|
|
|
See also: [process](#process), [renderer process](#renderer-process)
|
|
|
|
|
|
2016-11-04 21:28:59 +03:00
|
|
|
|
### MAS
|
2016-11-03 23:53:40 +03:00
|
|
|
|
|
|
|
|
|
Acronym for Apple's Mac App Store. For details on submitting your app to the
|
2023-01-16 12:22:49 +03:00
|
|
|
|
MAS, see the [Mac App Store Submission Guide][].
|
2016-11-03 23:53:40 +03:00
|
|
|
|
|
2018-04-03 15:58:25 +03:00
|
|
|
|
### Mojo
|
|
|
|
|
|
2021-09-22 02:52:24 +03:00
|
|
|
|
An IPC system for communicating intra- or inter-process, and that's important
|
|
|
|
|
because Chrome is keen on being able to split its work into separate processes
|
|
|
|
|
or not, depending on memory pressures etc.
|
2018-04-03 15:58:25 +03:00
|
|
|
|
|
2022-03-17 15:45:55 +03:00
|
|
|
|
See https://chromium.googlesource.com/chromium/src/+/main/mojo/README.md
|
2018-04-03 15:58:25 +03:00
|
|
|
|
|
2021-09-22 02:52:24 +03:00
|
|
|
|
See also: [IPC](#ipc)
|
|
|
|
|
|
|
|
|
|
### MSI
|
|
|
|
|
|
|
|
|
|
On Windows, MSI packages are used by the Windows Installer
|
|
|
|
|
(also known as Microsoft Installer) service to install and configure
|
|
|
|
|
applications.
|
|
|
|
|
|
|
|
|
|
More information can be found in [Microsoft's documentation][msi].
|
|
|
|
|
|
2016-11-04 21:28:59 +03:00
|
|
|
|
### native modules
|
2016-11-03 23:53:40 +03:00
|
|
|
|
|
2023-01-16 12:22:49 +03:00
|
|
|
|
Native modules (also called [addons][] in
|
2016-11-03 23:53:40 +03:00
|
|
|
|
Node.js) are modules written in C or C++ that can be loaded into Node.js or
|
2018-05-08 08:16:09 +03:00
|
|
|
|
Electron using the require() function, and used as if they were an
|
2016-11-03 23:53:40 +03:00
|
|
|
|
ordinary Node.js module. They are used primarily to provide an interface
|
|
|
|
|
between JavaScript running in Node.js and C/C++ libraries.
|
|
|
|
|
|
|
|
|
|
Native Node modules are supported by Electron, but since Electron is very
|
|
|
|
|
likely to use a different V8 version from the Node binary installed in your
|
|
|
|
|
system, you have to manually specify the location of Electron’s headers when
|
|
|
|
|
building native modules.
|
|
|
|
|
|
2023-01-16 12:22:49 +03:00
|
|
|
|
For more information, read the [Native Node Modules][] tutorial.
|
2021-09-22 02:52:24 +03:00
|
|
|
|
|
|
|
|
|
### notarization
|
2016-11-03 23:53:40 +03:00
|
|
|
|
|
2021-09-22 02:52:24 +03:00
|
|
|
|
Notarization is a macOS-specific process where a developer can send a
|
|
|
|
|
code-signed app to Apple servers to get verified for malicious
|
|
|
|
|
components through an automated service.
|
2016-11-06 06:07:36 +03:00
|
|
|
|
|
2021-09-22 02:52:24 +03:00
|
|
|
|
See also: [code signing](#code-signing)
|
2016-11-06 06:07:36 +03:00
|
|
|
|
|
2017-10-22 01:15:30 +03:00
|
|
|
|
### OSR
|
2017-07-07 23:43:54 +03:00
|
|
|
|
|
2021-09-22 02:52:24 +03:00
|
|
|
|
OSR (offscreen rendering) can be used for loading heavy page in
|
2017-11-29 13:58:24 +03:00
|
|
|
|
background and then displaying it after (it will be much faster).
|
2017-10-23 19:36:52 +03:00
|
|
|
|
It allows you to render page without showing it on screen.
|
2016-11-06 06:07:36 +03:00
|
|
|
|
|
2023-01-16 12:22:49 +03:00
|
|
|
|
For more information, read the [Offscreen Rendering][] tutorial.
|
2021-09-22 02:52:24 +03:00
|
|
|
|
|
|
|
|
|
### preload script
|
|
|
|
|
|
|
|
|
|
Preload scripts contain code that executes in a renderer process
|
|
|
|
|
before its web contents begin loading. These scripts run within
|
|
|
|
|
the renderer context, but are granted more privileges by having
|
|
|
|
|
access to Node.js APIs.
|
|
|
|
|
|
|
|
|
|
See also: [renderer process](#renderer-process), [context isolation](#context-isolation)
|
|
|
|
|
|
2016-11-04 21:28:59 +03:00
|
|
|
|
### process
|
2016-11-04 21:24:41 +03:00
|
|
|
|
|
|
|
|
|
A process is an instance of a computer program that is being executed. Electron
|
2023-01-16 12:22:49 +03:00
|
|
|
|
apps that make use of the [main][] and one or many [renderer][] process are
|
2016-11-04 21:24:41 +03:00
|
|
|
|
actually running several programs simultaneously.
|
|
|
|
|
|
|
|
|
|
In Node.js and Electron, each running process has a `process` object. This
|
|
|
|
|
object is a global that provides information about, and control over, the
|
|
|
|
|
current process. As a global, it is always available to applications without
|
|
|
|
|
using require().
|
|
|
|
|
|
2016-12-22 00:47:17 +03:00
|
|
|
|
See also: [main process](#main-process), [renderer process](#renderer-process)
|
|
|
|
|
|
2016-11-04 21:28:59 +03:00
|
|
|
|
### renderer process
|
2016-11-03 23:53:40 +03:00
|
|
|
|
|
|
|
|
|
The renderer process is a browser window in your app. Unlike the main process,
|
|
|
|
|
there can be multiple of these and each is run in a separate process.
|
|
|
|
|
They can also be hidden.
|
|
|
|
|
|
2016-12-22 00:47:17 +03:00
|
|
|
|
See also: [process](#process), [main process](#main-process)
|
|
|
|
|
|
2021-09-22 02:52:24 +03:00
|
|
|
|
### sandbox
|
|
|
|
|
|
|
|
|
|
The sandbox is a security feature inherited from Chromium that restricts
|
|
|
|
|
your renderer processes to a limited set of permissions.
|
|
|
|
|
|
2023-01-16 12:22:49 +03:00
|
|
|
|
For more information, read the [Process Sandboxing][] tutorial.
|
2021-09-22 02:52:24 +03:00
|
|
|
|
|
|
|
|
|
See also: [process](#process)
|
|
|
|
|
|
2016-11-04 21:28:59 +03:00
|
|
|
|
### Squirrel
|
2016-11-03 23:53:40 +03:00
|
|
|
|
|
|
|
|
|
Squirrel is an open-source framework that enables Electron apps to update
|
2023-01-16 12:22:49 +03:00
|
|
|
|
automatically as new versions are released. See the [autoUpdater][] API for
|
2016-11-03 23:53:40 +03:00
|
|
|
|
info about getting started with Squirrel.
|
|
|
|
|
|
2016-11-04 21:28:59 +03:00
|
|
|
|
### userland
|
2016-11-03 23:53:40 +03:00
|
|
|
|
|
|
|
|
|
This term originated in the Unix community, where "userland" or "userspace"
|
|
|
|
|
referred to programs that run outside of the operating system kernel. More
|
|
|
|
|
recently, the term has been popularized in the Node and npm community to
|
|
|
|
|
distinguish between the features available in "Node core" versus packages
|
|
|
|
|
published to the npm registry by the much larger "user" community.
|
|
|
|
|
|
2016-11-06 06:07:36 +03:00
|
|
|
|
Like Node, Electron is focused on having a small set of APIs that provide
|
|
|
|
|
all the necessary primitives for developing multi-platform desktop applications.
|
2016-11-03 23:53:40 +03:00
|
|
|
|
This design philosophy allows Electron to remain a flexible tool without being
|
|
|
|
|
overly prescriptive about how it should be used. Userland enables users to
|
|
|
|
|
create and share tools that provide additional functionality on top of what is
|
|
|
|
|
available in "core".
|
|
|
|
|
|
2022-10-20 08:49:49 +03:00
|
|
|
|
### utility process
|
|
|
|
|
|
|
|
|
|
The utility process is a child of the main process that allows running any
|
|
|
|
|
untrusted services that cannot be run in the main process. Chromium uses this
|
|
|
|
|
process to perform network I/O, audio/video processing, device inputs etc.
|
|
|
|
|
In Electron, you can create this process using [UtilityProcess][] API.
|
|
|
|
|
|
|
|
|
|
See also: [process](#process), [main process](#main-process)
|
|
|
|
|
|
2016-11-04 21:28:59 +03:00
|
|
|
|
### V8
|
2016-11-03 23:53:40 +03:00
|
|
|
|
|
|
|
|
|
V8 is Google's open source JavaScript engine. It is written in C++ and is
|
2017-08-01 20:58:33 +03:00
|
|
|
|
used in Google Chrome. V8 can run standalone, or can be embedded into any C++ application.
|
|
|
|
|
|
2017-11-29 13:58:24 +03:00
|
|
|
|
Electron builds V8 as part of Chromium and then points Node to that V8 when
|
2017-08-01 20:58:33 +03:00
|
|
|
|
building it.
|
|
|
|
|
|
2017-11-29 13:58:24 +03:00
|
|
|
|
V8's version numbers always correspond to those of Google Chrome. Chrome 59
|
2017-08-01 20:58:33 +03:00
|
|
|
|
includes V8 5.9, Chrome 58 includes V8 5.8, etc.
|
|
|
|
|
|
2020-11-02 12:58:14 +03:00
|
|
|
|
- [v8.dev](https://v8.dev/)
|
2017-08-01 20:58:33 +03:00
|
|
|
|
- [nodejs.org/api/v8.html](https://nodejs.org/api/v8.html)
|
|
|
|
|
- [docs/development/v8-development.md](development/v8-development.md)
|
2016-11-03 23:53:40 +03:00
|
|
|
|
|
2016-11-04 21:28:59 +03:00
|
|
|
|
### webview
|
2016-11-04 21:24:41 +03:00
|
|
|
|
|
|
|
|
|
`webview` tags are used to embed 'guest' content (such as external web pages) in
|
|
|
|
|
your Electron app. They are similar to `iframe`s, but differ in that each
|
|
|
|
|
webview runs in a separate process. It doesn't have the same
|
|
|
|
|
permissions as your web page and all interactions between your app and
|
|
|
|
|
embedded content will be asynchronous. This keeps your app safe from the
|
|
|
|
|
embedded content.
|
|
|
|
|
|
2016-11-03 23:53:40 +03:00
|
|
|
|
[addons]: https://nodejs.org/api/addons.html
|
2016-12-26 12:28:08 +03:00
|
|
|
|
[asar]: https://github.com/electron/asar
|
2021-09-22 02:52:24 +03:00
|
|
|
|
[autoupdater]: api/auto-updater.md
|
|
|
|
|
[code signing]: tutorial/code-signing.md
|
|
|
|
|
[context isolation]: tutorial/context-isolation.md
|
|
|
|
|
[mac app store submission guide]: tutorial/mac-app-store-submission-guide.md
|
2016-11-03 23:53:40 +03:00
|
|
|
|
[main]: #main-process
|
2023-03-29 13:16:44 +03:00
|
|
|
|
[msi]: https://learn.microsoft.com/en-us/windows/win32/msi/windows-installer-portal
|
2022-12-05 21:18:57 +03:00
|
|
|
|
[Native Node Modules]: tutorial/using-native-node-modules.md
|
2021-09-22 02:52:24 +03:00
|
|
|
|
[offscreen rendering]: tutorial/offscreen-rendering.md
|
|
|
|
|
[process sandboxing]: tutorial/sandbox.md
|
2016-11-03 23:53:40 +03:00
|
|
|
|
[renderer]: #renderer-process
|
2022-10-20 08:49:49 +03:00
|
|
|
|
[UtilityProcess]: api/utility-process.md
|