Adds js code.
Adds event field into widget