mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-21 11:26:15 +02:00
fix(opener-js): allow URL type (#2695)
* fix(opener-js): allow URL type * bump opener rs in change file --------- Co-authored-by: Tony <legendmastertony@gmail.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"opener": patch
|
||||
"opener-js": patch
|
||||
---
|
||||
|
||||
Adjust `open_url` url type to allow `URL`
|
||||
@@ -38,7 +38,10 @@ import { invoke } from '@tauri-apps/api/core'
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
export async function openUrl(url: string, openWith?: string): Promise<void> {
|
||||
export async function openUrl(
|
||||
url: string | URL,
|
||||
openWith?: string
|
||||
): Promise<void> {
|
||||
await invoke('plugin:opener|open_url', {
|
||||
url,
|
||||
with: openWith
|
||||
|
||||
Reference in New Issue
Block a user