initial attempt at event handling.

// @sindresorhus @CWSpear