OOjs/Events

is a mixin that allows event handlers to be attached, called when events occur, and detached.

Basic usage
The simplest way to attach and detach event handlers is by using the  and   methods.

Using with objects
When working with methods, use the  and   methods.

Emitting events
Attached event handlers are called with arguments provided to the  method.