# lace:confirm

Gate any action behind a confirmation dialog. Add `lace:confirm` to the same element as an action
(`lace:click`, `lace:submit`, ...); the browser shows a confirm dialog and the action only runs if the
user accepts. Cancelling aborts it.

```django
<button lace:click="delete(1)" lace:confirm="Delete this item?">Delete</button>
```

If you omit the message, a default ("Are you sure?") is used:

```django
<button lace:click="reset" lace:confirm>Reset</button>
```

The action's default is still prevented when applicable, so a cancelled `lace:submit` will not reload
the page.
