/// This all _works_ at present, but the double invoke in the view code /// feels weird, like something's not quite right ////// resource code 'require baseclass'; 'require view'; 'require poll'; 'require fs'; var Junk = baseclass.extend({ Junk: function(something) { return view.extend({ render: function() { return E([ E('h3', {}, _('Oh boi, javascript is so amazing')), E('h4', {}, something) ]); }, handleSave: null, handleSaveApply: null, handleReset: null }); } }); return Junk; ///////////// view code. 'use strict'; 'require ui'; 'require view'; 'require remake.test1 as test1'; return view.extend({ render: function() { var m = new test1.Junk("parameters for re-useable code"); var wat = new m(); // <<<<<<< ? can we avoid this sanely? return wat.render(); } });