Web SDKv1.0.0

callbacks.onConfirm

Replaces the confirmation dialog ("Delete this page?"). Called in place of the SDK's confirmation dialog, for every question confirmations has on, with the words the SDK would have shown (title, message, confirmLabel, cancelLabel) and what the action is about (action, count, name). name and message carry text from the document: show them as text, never HTML. Resolve true to go ahead; anything else, and a rejection (logged with console.warn), leaves things as they are.
(request: ConfirmRequest) => Promise<boolean> | boolean

Example

onConfirmTypeScript
new PDFViewer(container, doc, {
  callbacks: {
    onConfirm: async ({ action, title, message, confirmLabel, cancelLabel, count, name }) =>
      myDialogs.confirm({ title, body: message, ok: confirmLabel, cancel: cancelLabel, tone: 'danger' }),
  },
});

More in Callbacks