mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-27 07:50:57 +01:00
20 lines
362 B
JavaScript
20 lines
362 B
JavaScript
|
/**
|
||
|
* @provides javelin-view-renderer
|
||
|
* @requires javelin-install
|
||
|
*/
|
||
|
|
||
|
JX.install('ViewRenderer', {
|
||
|
members: {
|
||
|
visit: function(view, children) {
|
||
|
return view.render(children);
|
||
|
}
|
||
|
},
|
||
|
statics: {
|
||
|
render: function(view) {
|
||
|
var renderer = new JX.ViewRenderer();
|
||
|
return view.accept(JX.bind(renderer, renderer.visit));
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
|