Skip to content
Devix Open Source

Work that takes a moment

onConfirm can be async: the dialog stays open and busy, and a failure is shown inside it instead of being lost.

Live preview
<div class="demo">
  <button class="demo-btn" id="publish">Publish</button>
  <p class="demo-out" id="out">Not published</p>
  <p class="demo-hint">The first attempt fails on purpose; press Publish again in the dialog.</p>
</div>