Simple pub-sub for JavaScript