added js api doc