update javascript api