Header menu logo fable-electron-docs-api

IOnSecondInstance Type

This event will be emitted inside the primary instance of your application when a second instance has been executed and calls app.requestSingleInstanceLock().argv is an Array of the second instance's command line arguments, and workingDirectory is its current working directory. Usually applications respond to this by making their primary window focused and non-minimized.> [!NOTE] argv will not be exactly the same list of arguments as those passed to the second instance. The order might change and additional arguments might be appended. If you need to maintain the exact same arguments, it's advised to use additionalData instead.> [!NOTE] If the second instance is started by a different user than the first, the argv array will not include the arguments.This event is guaranteed to be emitted after the ready event of app gets emitted.> [!NOTE] Extra command line arguments might be added by Chromium, such as --original-process-start-time.

Instance members

Instance member Description

this.additionalData

Full Usage: this.additionalData

Modifiers: abstract

A JSON object of additional data passed from the second instance

this.argv

Full Usage: this.argv

Modifiers: abstract

An array of the second instance's command line arguments

this.event

Full Usage: this.event

Modifiers: abstract

this.workingDirectory

Full Usage: this.workingDirectory

Modifiers: abstract

The second instance's working directory

Type something to start searching.