Skip to content

Commit 6c9e08d

Browse files
fix(opener-js): allow URL type (#2695)
* fix(opener-js): allow URL type * bump opener rs in change file --------- Co-authored-by: Tony <[email protected]>
1 parent a6b8540 commit 6c9e08d

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.changes/opener-url-type.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"opener": patch
3+
"opener-js": patch
4+
---
5+
6+
Adjust `open_url` url type to allow `URL`

plugins/opener/guest-js/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ import { invoke } from '@tauri-apps/api/core'
3838
*
3939
* @since 2.0.0
4040
*/
41-
export async function openUrl(url: string, openWith?: string): Promise<void> {
41+
export async function openUrl(
42+
url: string | URL,
43+
openWith?: string
44+
): Promise<void> {
4245
await invoke('plugin:opener|open_url', {
4346
url,
4447
with: openWith

0 commit comments

Comments
 (0)