These are chat archives for canjs/canjs

2nd
May 2016
Chris
@chrischrischris
May 02 2016 15:30

Is there an elegant way to get to the init function of a canjs Control that I'm subclassing? E.g:

var ClassA = can.Control.extend({}, {init: function () { console.log('A'); });
var ClassB = ClassA.extend({}, {init: function () {console.log('B'); this.__proto__.__proto__.init()});

Using the __proto__.__proto__ works but seems very wrong.

Kevin Phillips
@phillipskevin
May 02 2016 15:31
Chris
@chrischrischris
May 02 2016 15:36
Thanks! Kicking myself for not reading the Construct docs ...
Kevin Phillips
@phillipskevin
May 02 2016 15:37
No problem. There are a lot of docs, don’t worry about it.