Compartmentalized javascript