initial attempt at event handling.

// @sindresorhus @CWSpear 
Here it is!