A javascript event bus implementation