The watermark object is an instance accessible from the main mupdfwv.MuPDFWebViewer instance as follows:
const toast = mupdf.toast;
This assumes you have returned your instance name as mupdf from the initMuPDFWebViewer() promise!

toast

The toast object has the following methods:

show

show(config: { type: 'success' | 'fail' | 'notification', content: string, header?: string, timeout?: number }) Shows a toast message.
  • Arguments:
    • config – Configuration object.
Config object:
  • Arguments:
    • type(required) Toast type (“success” | “fail” | “notification”).
    • content(required) Toast content.
    • header(optional) Toast header.
    • timeout(optional) Display duration in milliseconds.
Example
mupdf.toast.show({ type: 'success', content: 'Document opened' });