@tauri-apps/plugin-notification - v2.3.0
    Preparing search index...

    Function requestPermission

    • Requests the permission to send notifications.

      Returns Promise<NotificationPermission>

      A promise resolving to whether the user granted the permission or not.

      import { isPermissionGranted, requestPermission } from '@tauri-apps/plugin-notification';
      let permissionGranted = await isPermissionGranted();
      if (!permissionGranted) {
      const permission = await requestPermission();
      permissionGranted = permission === 'granted';
      }

      2.0.0