new·Earn with mozg — 20% of every monthSend somebody here and take a fifth of every plan payment they make, for as long as they keep paying — not a bounty on the first invoice. Your handle is the link, the window is thirty days, and the commission lands on your balance the second they pay. Free to join: if you have signed in, you already have the link. mozg.sh/earnall news →
mozg.beta
Sign in

Electron · all subjects

core process model

16 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

app.commandLine.appendSwitch to add command line switches

Command line switches can be appended using app.commandLine.appendSwitch(switch, value) in the app's main script before the 'ready' event of the app module is emitted. Example: app.commandLine.appendSwitch('remote-debugging-port', '8315').

process.resourcesPath property

process.resourcesPath is a readonly string representing the path to the resources directory.

process.loaded event

The 'loaded' event is emitted when Electron has loaded its internal initialization script and is beginning to load the web page or the main script.

process.defaultApp property

process.defaultApp is a readonly boolean. When the app is started by being passed as a parameter to the default Electron executable, this property is true in the main process, otherwise it is undefined. For example, when running the app with 'electron .', it is true, even if the app is packaged. This can be useful to determine how many arguments will need to be sliced off from process.argv.

process.isMainFrame property

process.isMainFrame is a readonly boolean that is true when the current renderer context is the main renderer frame. To get the ID of the current frame, use webFrame.routingId.

process.mas property

process.mas is a readonly boolean. For Mac App Store build, this property is true; for other builds it is undefined.

process.noAsar property

process.noAsar is a boolean that controls ASAR support inside your application. Setting this to true will disable the support for asar archives in Node's built-in modules.

process.noDeprecation property

process.noDeprecation is an optional boolean that controls whether or not deprecation warnings are printed to stderr. Setting this to true will silence deprecation warnings. This property is used instead of the --no-deprecation command line flag.

process.throwDeprecation property

process.throwDeprecation is a boolean that controls whether or not deprecation warnings will be thrown as exceptions. Setting this to true will throw errors for deprecations. This property is used instead of the --throw-deprecation command line flag.

process.traceDeprecation property

process.traceDeprecation is a boolean that controls whether or not deprecations printed to stderr include their stack trace. Setting this to true will print stack traces for deprecations. This property is used instead of the --trace-deprecation command line flag.

process.traceProcessWarnings property

process.traceProcessWarnings is a boolean that controls whether or not process warnings printed to stderr include their stack trace. Setting this to true will print stack traces for process warnings (including deprecations). This property is used instead of the --trace-warnings command line flag.

process.type property values

process.type is a readonly string representing the current process's type. Possible values are: 'browser' (the main process), 'renderer' (a renderer process), 'service-worker' (in a service worker), 'worker' (in a web worker), or 'utility' (in a node process launched as a service).

process.versions.chrome property

process.versions.chrome is a readonly string representing Chrome's version string.

process.versions.electron property

process.versions.electron is a readonly string representing Electron's version string.

process.windowsStore property

process.windowsStore is a readonly boolean. If the app is running as an MSIX package (including AppX for Windows Store), this property is true; otherwise it is undefined.

process.parentPort property

process.parentPort is an Electron.ParentPort property if this is a UtilityProcess (or null otherwise) that allows communication with the parent process.

Give your agent this brain