Custom Events
Events communicate user intent to the host application. Examples include close or change. Events should be stateless only relaying user interaction and avoid changing the state of the element.
<nve-alert closable></nve-alert>
<script type="module">
const alert = document.querySelector('nve-alert');
alert.addEventListenter('close', event => console.log(event));
</script>
Compatibility
Events should not include verb/action style prefixing such as on or trigger. Many frameworks de-sugar event handlers to prefix with keywords like on. Example React onClose={this.close}