mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user