Javascript: sexy pubsub