mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-19 08:31:35 +03:00
31 lines
390 B
TypeScript
31 lines
390 B
TypeScript
|
import { invoke } from './tauri'
|
||
|
|
||
|
/**
|
||
|
* sets the window title
|
||
|
*
|
||
|
* @param title the new title
|
||
|
*/
|
||
|
function setTitle(title: string): void {
|
||
|
invoke({
|
||
|
cmd: 'setTitle',
|
||
|
title
|
||
|
})
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* opens an URL on the user default browser
|
||
|
*
|
||
|
* @param url the URL to open
|
||
|
*/
|
||
|
function open(url: string): void {
|
||
|
invoke({
|
||
|
cmd: 'open',
|
||
|
uri: url
|
||
|
})
|
||
|
}
|
||
|
|
||
|
export {
|
||
|
setTitle,
|
||
|
open
|
||
|
}
|