Update widget.js

Included code for widget actions