JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://raw.github.com/documentcloud/underscore/1.1.7/underscore.js"></script>
<script src="https://raw.github.com/documentcloud/backbone/0.5.3/backbone.js"></script>
<pre class="log"></pre>
JavaScript
var log = function(data){
$('.log').append(data.toString())
};
var ViewBase = Backbone.View.extend({
constructor: function(){
Backbone.View.call(this, arguments);
var oldRender = this.render;
this.render = function(){
oldRender.call(this);
log('trigger event\'s rendered')
}
},
initialize: function(){
log('init viewBase \n')
},
render: function(){
log('cool ')
}
});
var ViewInherit = ViewBase.extend({
initialize: function(){
log('init viewInherit \n')
},
render: function(){
log('rendering \n')
}
});
$(function(){
var app = new ViewInherit()
app.render()
})