Glossary Term
EventTarget.addEventListener()
The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Common targets are Element, or its children, Document, and Window, but the target may be any object that supports events (such as IDBRequest).
Note: The addEventListener() method is the recommended way to register an event listener. The benefits are as follows: – It allows adding more than one handler for an event. This is particularly useful for libraries, JavaScript modules, or any other kind of code that needs to work well with other libraries or extensions. – In contrast to using an onXYZ property, it gives you finer-grained control of the phase when the listener is activated (capturing vs. bubbling). – It works on any event target, not just HTML or SVG elements.
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
