Javascript: PubSub test