From 098d6f9bb1fd26f2d192db497992ab95b258ce55 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Sun, 27 Feb 2022 01:52:55 +0100 Subject: feat: Location bar actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The buttons and the text field in the location bar shall now affect the BrowserView of the loaded service. Some error handling is still needed, e.g., when loading a web page fails due to a DNS error. Signed-off-by: Kristóf Marussy --- .../src/infrastructure/electron/impl/ElectronServiceView.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'packages/main/src/infrastructure/electron/impl') diff --git a/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts b/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts index 6ff8e21..e5fdf11 100644 --- a/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts +++ b/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts @@ -105,6 +105,18 @@ export default class ElectronServiceView implements ServiceView { this.browserView.webContents.goForward(); } + reload(ignoreCache: boolean): void { + if (ignoreCache) { + this.browserView.webContents.reloadIgnoringCache(); + } else { + this.browserView.webContents.reload(); + } + } + + stop(): void { + this.browserView.webContents.stop(); + } + setBounds(bounds: BrowserViewBounds): void { this.browserView.setBounds(bounds); } -- cgit v1.2.3-70-g09d2