A tiny JS event dispatcher