Pub/Sub oriented JavaScript