Function: openExternalValidatedOrThrow()
openExternalValidatedOrThrow(
args: {failureMessagePrefix:string;policy?:Readonly<{requireHttps?:boolean; }>;rejectionVerbPhrase:string;url:unknown; }):Promise<Readonly<{normalizedUrl:string;ok:true;safeUrlForLogging:string; }>>
Defined in: electron/services/shell/validatedExternalOpen.ts:173
Validates a candidate external-open URL and opens it via
shell.openExternal.
Parameters
args
failureMessagePrefix
string
Prefix used if the underlying Electron open fails.
policy?
Readonly<{ requireHttps?: boolean; }>
Optional additional policy constraints (e.g. HTTPS-only).
rejectionVerbPhrase
string
Verb phrase for rejection errors (e.g. "Rejected unsafe openExternal").
url
unknown
URL candidate (often from IPC payloads).
Returns
Promise<Readonly<{ normalizedUrl: string; ok: true; safeUrlForLogging: string; }>>
Throws
TypeError - When URL validation fails.