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:

ParameterTypeDescription
filePathstringThe path to the HTML file relative to the root of the application.
options?ElectronBrowserWindowLoadFileOptions | undefinedOptions for loading the file.

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