fix docstring in events.js

example shows registering a handler, not triggering an event.