From 0e153ae47ef88217a0ede2b3f6a1d738ef037709 Mon Sep 17 00:00:00 2001 From: Revertron Date: Thu, 15 Apr 2021 21:44:34 +0200 Subject: [PATCH] Fixed #44, no external object in Arch Linux webkit. --- Cargo.toml | 2 +- src/webview/scripts.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 4f082f9..13e1883 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "alfis" -version = "0.4.3" +version = "0.4.4" authors = ["Revertron "] edition = "2018" build = "build.rs" diff --git a/src/webview/scripts.js b/src/webview/scripts.js index d167822..c5febc3 100644 --- a/src/webview/scripts.js +++ b/src/webview/scripts.js @@ -149,6 +149,10 @@ function editDomain(domain) { } function onLoad() { + // Workaround for Arch Linux Webkit + // https://github.com/Boscop/web-view/issues/212#issuecomment-671055663 + window.external={invoke:function(x){window.webkit.messageHandlers.external.postMessage(x);}}; + external.invoke(JSON.stringify({cmd: 'loaded'})); }