EventListener object (Object/DOM)

A script function that is called when an event is triggered.

Availability:

DOM level - 2
JavaScript - 1.5
Netscape - 6.0
JavaScript syntax:NmyEventListener = function Listener(anEvent) { ... }
Argument list:anEventA placeholder argument

This is an event handler function which you can define in the script source text and can then register as the listener for an event by means of the addEventListener() and removeEventListener() methods belonging to the EventTarget object.

The script function takes a single argument which is an Event object that is instantiated as the event is triggered.

Warnings:

See also:EventTarget.addEventListener(), MutationEvent object