A simple JavaScript event-emitter