Demo: dijit/Declaration with Connections

The following demonstrates using a script block in your custom widget definition that connects to an existing Widget method. Take a look at the source to see how it is done.