Added docs for javascript API