Update web.js

the api changed