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:
Shaun Hamilton
2025-05-14 11:58:54 +02:00
committed by GitHub
parent a6b854032d
commit 6c9e08dccb
2 changed files with 10 additions and 1 deletions
+6
View File
@@ -0,0 +1,6 @@
---
"opener": patch
"opener-js": patch
---
Adjust `open_url` url type to allow `URL`
+4 -1
View File
@@ -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