refactor(api)!: renamed getCurrent functions to avoid ambiguity (#10229)

* refactor(api)!: renamed `getCurrent` functions to avoid ambiguity

closes #10193

* Update .changes/get-current-ambguity.md

* rename `getAll` and update docs and examples
This commit is contained in:
Amr Bashir
2024-07-11 14:26:15 +03:00
committed by GitHub
parent 249cdde9b6
commit 2b1ceb40d3
10 changed files with 207 additions and 191 deletions

View File

@@ -1,12 +1,12 @@
<script>
import { getCurrent } from '@tauri-apps/api/webviewWindow'
import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow'
import { invoke } from '@tauri-apps/api/core'
import { onMount, onDestroy } from 'svelte'
export let onMessage
let unlisten
const webviewWindow = getCurrent()
const webviewWindow = getCurrentWebviewWindow()
onMount(async () => {
unlisten = await webviewWindow.listen('rust-event', onMessage)