bind
Attaches a handler to an event.
Parameters
eventName String
The name of the event.
handler Function
A function to execute each time the event is triggered. That function should have a single parameter which will contain any event specific data.
Important: The context (
this
) of thehandler
function is set to the observable object itself.