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
Name | Type | Description |
---|---|---|
window_ | BrowserWindow | The BrowserWindow instance to load the URL into. |
pathname | string | The 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)