Captain is currently in ALPHA. We are happy to get your feedback
Core API
Helpers Utils Load Window

Module: helpers/utils/load-window

Table of contents

Functions

Functions

loadURL

loadURL(window_, pathname): Promise<void>

Loads a URL into the given BrowserWindow instance, adjusting the URL path to include the appropriate locale prefix. This function supports both development and production environments, altering the base URL accordingly.

In production, it uses the app:// protocol, whereas in development, it connects to a localhost server at a port specified by the second command-line argument.

Parameters

NameTypeDescription
window_BrowserWindowThe BrowserWindow instance to load the URL into.
pathnamestringThe path to be loaded, appended after the locale prefix.

Returns

Promise<void>

Defined in

src/electron/helpers/utils/load-window.ts:18 (opens in a new tab)