Interface IDialogToastOptions

interface IDialogToastOptions {
    action?: IDialogToastAction;
    container?: HTMLElement;
    duration?: number;
    error?: unknown;
    kind?: DialogToastKind;
    source?: string;
}

Properties

A button in the toast. A dialog wrapper without one (the browser's) leaves it out.

container?: HTMLElement

The element to show it in, like the container of a canvas. The toasts are placed at its top, so it must be positioned (position: relative, absolute or fixed, not static). Default: the page.

duration?: number

How long the toast stays, in ms. 0 keeps it until a click. Default: 4000, an error 8000; with an action 8000, an error 10000. htmlDialogWrapper pauses it while the pointer is on the toast or it has the focus.

error?: unknown

A message (default), a warning or an error

source?: string

Who shows the toast, like a threepipe plugin's type ('CanvasRecorder'), and the error it is about, if any. Not shown: an app that wraps toast reads them to change the message of one source or one error, add an action, or show nothing.