Revision Content

{{ DomRef() }}

An EventTarget is a DOM interface implemented by objects that can receive DOM events and have listeners for them. The most common objects implemented the EventTarget interface are DOM elements, although other objects can implement it too, for example {{domxref("document")}}, {{domxref("window")}}, {{domxref("XMLHttpRequest")}}, {{domxref("AudioNode")}}, and others.

Methods

{{domxref("EventTarget.addEventListener()")}}

Register an event handler of a specific event type on the EventTarget.