add js option to API