ComPDFKit Web SDK
    Preparing search index...

    Function showWarningMessage

    • Opens the warning dialog. A string is treated as { message }. An object replaces the previous options as a whole: title / message / confirmBtnText (translated when the language pack has the key, otherwise shown as is), onConfirm / onCancel (may return a Promise or a value; the dialog closes once it resolves). The arguments are type-checked. The dialog has Cancel and OK buttons, X acts as Cancel, clicking the backdrop or pressing Esc does not close it. If a callback throws, the dialog still closes and the error is logged with console.error.

      Parameters

      Returns void

      instance.UI.showWarningMessage({
      title: 'Delete page',
      message: 'This cannot be undone.',
      onConfirm: () => deletePage(),
      });