Skip to content

ElectronWebContents.loadFile method

ElectronWebContents › loadFile

Unofficial

Loads the given file in the window.

Signature:

loadFile(filePath: string, options?: ElectronBrowserWindowLoadFileOptions | undefined): Promise<void>

Parameters:

Parameter Type Description
filePath string The path to the HTML file relative to the root of the application.
options? ElectronBrowserWindowLoadFileOptions | undefined Options for loading the file.

Returns: Promise<void>A promise that resolves when the page has finished loading.