Unterproto
unterproto (https://github.com/fragphace/unterproto) example.
by fragphace
HTML
<script src="https://raw.github.com/fragphace/unterproto/master/lib/unterproto.js"></script>
JavaScript
(function () {
var A = Unterproto.inherits({
initialize: function (foo) {
this.foo = foo;
}
});
var B = A.inherits({
getFoo: function () {
return this.foo;
}
});
var b = B.instance('bar');
alert(b.getFoo()); // 'bar'
})();