Skip to main content

ConfirmController

Purpose

To allow links and forms to open a confirmation dialogue before proceeding with their default behaviour.

Actions

ActionPurpose
--

Targets

TargetPurposeDefault
---

Classes

ClassPurposeDefault
---

Values

ValueTypeDescriptionDefault
messageStringThe message to show to the user (if supported by the browser)The native browser are you sure? dialogue

Events

EventWhenDispatched onevent.detail
confirm:cancelledFired when the user cancels the actionThe controller element-

Side Effects

Adds event listeners to the controller root element. Either submit for forms, or click for links.

Shows a native confirmation dialogue using window.confirm to the user with the specified message if they trigger the event.

How to Use