Added a doc for the js functions.