.addEventListener()

Term side of the Card
Topic: Object on Page
Unit title: .addEventListener()
Categories: Method
Explanation side of the Card

Explanation: The browser API method used to attach a function to a specific event on an element, such as 'click', 'hover' or 'keydown'. This allows the function to run whenever the specified event occurs on that element.

Browser compatibility:
  • The chrome browser supports this feature starting from version 1
  • The edge browser supports this feature starting from version 12
  • The firefox browser supports this feature starting from version 1
  • The safari browser supports this feature starting from version 1
Availability: