This declares a JavaScript file located in the Content directory of the QuickChat module, which is loaded with the dashboard. The script is loaded every time the dashboard appears, regardless of whether there are any QuickChat gadgets, so take care to put stable code in the JavaScript file. While the script is executed each time the dashboard loads, the way to associate with a gadget instance is client script init methods:

The init method is invoked by the dashboard and starts updating the gadget every five seconds. While this is an easy way to update the gadget regularly, it is not particularly suited for a chat because it steals focus from the text box.