added webAPI in jscript and the front-end