🔰event handler
event (function) handler
argument:an Event object.
this
refers to the object on which the handler was registered.
return value: In modern JavaScript, event handlers should not return anything.
event handler can also be an object - 👉 see: object handler
Window-reflecting body element event handlers:
if you assign one of the following event handlers on document.body, it will be reflected on window too, and vice versa.
onblur, onerror, onfocus, onload, onresize, onscroll
📗 Medium
Last updated