window_dialogs.js 536 B

1234567891011121314151617181920212223
  1. // Copyright 2019-2023 Tauri Programme within The Commons Conservancy
  2. // SPDX-License-Identifier: Apache-2.0
  3. // SPDX-License-Identifier: MIT
  4. window.alert = function (message) {
  5. window.__TAURI_INVOKE__('tauri', {
  6. __tauriModule: 'Dialog',
  7. message: {
  8. cmd: 'messageDialog',
  9. message: message.toString()
  10. }
  11. })
  12. }
  13. window.confirm = function (message) {
  14. return window.__TAURI_INVOKE__('tauri', {
  15. __tauriModule: 'Dialog',
  16. message: {
  17. cmd: 'confirmDialog',
  18. message: message.toString()
  19. }
  20. })
  21. }