Files
tauri-plugins-workspace/plugins/deep-link/api-iife.js
T
Lucas Fernandes Nogueira ae3c808eb6 fix: global API script should reuse window.__TAURI__ types (#3602)
currently each script inlines what it needs from @tauri-apps/api, so type checks like `image instanceof Image` all fail
2026-09-22 06:04:28 -03:00

2 lines
705 B
JavaScript

if("__TAURI__"in window){var __TAURI_PLUGIN_DEEP_LINK__=function(e,n,i){"use strict";return e.getCurrent=async function(){return await n.invoke("plugin:deep-link|get_current")},e.isRegistered=async function(e){return await n.invoke("plugin:deep-link|is_registered",{protocol:e})},e.onOpenUrl=async function(e){return await i.listen("deep-link://new-url",n=>{e(n.payload)})},e.register=async function(e){return await n.invoke("plugin:deep-link|register",{protocol:e})},e.unregister=async function(e){return await n.invoke("plugin:deep-link|unregister",{protocol:e})},e}({},window.__TAURI__.core,window.__TAURI__.event);Object.defineProperty(window.__TAURI__,"deepLink",{value:__TAURI_PLUGIN_DEEP_LINK__})}