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 of every OOjs and OOjs UI object.

Using with objects
When working with methods, you can use the  and   methods. It lets you wire up multiple events at once using less code.

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