Skip to content

Function: spawnOpen()

Documentation / @wtf/platform-node / open / spawnOpen

function spawnOpen(__namedParameters): Open;

Defined in: packages/platform-node/src/open.ts:81

Opens a URL by the app of the platform that opens one: open of macOS, rundll32’s FileProtocolHandler of Windows, and xdg-open of any other, started by spawn, and waits for it to hand the URL over and exit. browser, as CLIs read it of BROWSER, names the program to start in its place, with the URL its one argument; none opens nothing; empty, or not given, is the platform’s app. One that cannot be started is a SystemError of its reason, NotFound of an opener not there; one that exits with a code but 0 is one of Unknown.

Parameters

ParameterType
__namedParameters{ browser?: string; platform: string; spawn: OpenerSpawn; }
__namedParameters.browser?string
__namedParameters.platformstring
__namedParameters.spawnOpenerSpawn

Returns

Open