Update widget.js

variable rename and var type fix