A working example of the pattern described at http://www.steward-digital.com/blog/dom-widget-pattern-ui-widgets-made-easy