Request confirmation on link
Shows how to request for confirmation before navigating a link.
Some hyperlinks may be more sensitive than others. For instance, hyperlinks may be used to issue commands. This example demonstrates the onclick-confirm attribute that propagates the click event only when accepted by the user:
<a href="https://www.google.com/" onclick-confirm="Are you sure you want to leave ?">Go to Google</a>
onclick-confirm attribute can intercept any click event and can also be used with buttons and other clickable objects.