type. Multiple handlers can now be registered
(and individually unregistered) for an event, and objects such as line
handlers now also expose events. See <a href="manual.html#events">the
full list here</a>.</p>

<p>(The <code>onKeyEvent</code> and <code>onDragEvent</code> options,
which act more as hooks than as event handlers, are still there in
their old form.)</p>

<pre data-lang="javascript">
cm.on("change", function(cm, change) {
  console.log("something changed! (" + change.origin + ")");
});
</pre>
<