mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-20 09:11:55 +03:00
b95319bd74
* feat(tauri.js) improve api module with type defs for each API function * chore(tauri) move endpoint specific modules * refactor(tauri) move tcp mod to tauri_api * feat(tauri) improve readDir signature, API features as kebab-case names * fix(tauri) make event's payload optional * feat(tauri) if invoke_handler fails, console.error the error message * chore(api) improve JSDoc * chore(tauri.js) update template * chore(tauri) delete empty mod * fix(tauri) tests and example with latest API signature
25 lines
326 B
JavaScript
25 lines
326 B
JavaScript
import tauri from './tauri'
|
|
|
|
/**
|
|
* sets the window title
|
|
*
|
|
* @param {string} title the new title
|
|
*/
|
|
function setTitle (title) {
|
|
tauri.setTitle(title)
|
|
}
|
|
|
|
/**
|
|
* opens an URL on the user default browser
|
|
*
|
|
* @param {string} url the URL to open
|
|
*/
|
|
function open (url) {
|
|
tauri.open(url)
|
|
}
|
|
|
|
export {
|
|
setTitle,
|
|
open
|
|
}
|