chore(deps): update to tauri beta.9 (#1037)

This commit is contained in:
Lucas Fernandes Nogueira
2024-03-07 00:08:52 -03:00
committed by GitHub
parent 16fc0f2ee3
commit cacf544d51
58 changed files with 374 additions and 339 deletions
+4 -4
View File
@@ -1,15 +1,15 @@
<script>
import { getCurrent } from "@tauri-apps/api/window";
import { getCurrent } from "@tauri-apps/api/webview";
import { invoke } from "@tauri-apps/api/core";
import { onMount, onDestroy } from "svelte";
const appWindow = getCurrent();
const webview = getCurrent();
export let onMessage;
let unlisten;
onMount(async () => {
unlisten = await appWindow.listen("rust-event", onMessage);
unlisten = await webview.listen("rust-event", onMessage);
});
onDestroy(() => {
if (unlisten) {
@@ -37,7 +37,7 @@
}
function emitEvent() {
appWindow.emit("js-event", "this is the payload string");
webview.emit("js-event", "this is the payload string");
}
</script>