Update js api implementation.