Confirms form submissions with the user before allowing the form to be submitted. This can be applied per submit
button and only affects the behavior of button
or input type=submit
, and only if no other click handler
has been put onto those buttons. Note that this does not affect links (a
elements).
This can ask for confirmation with external:Window#confirm
or a
brut-confirmation-dialog
. What it will use depends on several factors, all of which
are geared toward doing the right thing. Note that setting show-warnings
will elucidate the reasons
this component does what it does.
- If
dialog
is set:
- If that id is on a
<brut-confirmation-dialog>
that is used.
- If not,
window.confirm
is used.
- If
dialog
is not set:
- If there is exactly one
<brut-confirmation-dialog>
on the page, this is used.
- If there is more than one, or no
<brut-confirmation-dialog>
s, window.confirm
is used.