added some javascript support