Options
All
  • Public
  • Public/Protected
  • All
Menu

Module toast

Index

Functions

Functions

showToast

  • showToast(text: string, duration?: "short" | "long"): void
  • Show a Toast message. Some system may not show Toast in background, or need to grant notification permission to show Toast.

    Note! Multiple Toast will be queued, even if the script is terminated, Toast may still be shown.

    example
    "nodejs"
    const { showToast } = require('toast');
    showToast('Hello world!');
    

    Parameters

    • text: string

      Toast text

    • duration: "short" | "long" = 'short'

      Toast duration, default is short. Different system may have different specific duration for 'short' and 'long'.

    Returns void