JavaScript API