Purpose
To allow links and forms to open a confirmation dialogue before proceeding with their default behaviour.
Value | Type | Description | Default |
---|
message | String | The message to show to the user (if supported by the browser) | The native browser are you sure? dialogue |
Events
Event | When | Dispatched on | event.detail |
---|
confirm:cancelled | Fired when the user cancels the action | The 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