Html events
From wikinotes
You can register javascript callbacks to be fired on HTML DOM events.
Documentation
html5 event overview https://www.w3.org/TR/2018/WD-html53-20181018/webappapis.html#events html5 window/document events https://www.w3.org/TR/2018/WD-html53-20181018/webappapis.html#event-handlers-on-elements-document-objects-and-window-objects html5 media events https://www.w3.org/TR/2018/WD-html53-20181018/semantics-embedded-content.html#media-elements-event-summary w3schools: events https://www.w3schools.com/jsref/dom_obj_event.asp
Registering Callbacks
document .getElementById('button') .addEventListener('click', () => { /* do something when clicked */ })