mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 18:52:42 +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));
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
|