window.ts 390 B

123456789101112131415161718192021222324252627282930
  1. import { invoke } from './tauri'
  2. /**
  3. * sets the window title
  4. *
  5. * @param title the new title
  6. */
  7. function setTitle(title: string): void {
  8. invoke({
  9. cmd: 'setTitle',
  10. title
  11. })
  12. }
  13. /**
  14. * opens an URL on the user default browser
  15. *
  16. * @param url the URL to open
  17. */
  18. function open(url: string): void {
  19. invoke({
  20. cmd: 'open',
  21. uri: url
  22. })
  23. }
  24. export {
  25. setTitle,
  26. open
  27. }