Chainable Widget API

I wrote a wrapper around ListWidget API to provide a chainable interface: Scriptable-chainWidget.js
With this I can write widget syntax that is closer to the actual view hierarchy.
It only took 25 lines of code. You can copy the code to your script and try it out. (it’s at the end of the gist page)