Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : CanJS Control inheritance?

$
0
0
Not sure what you mean.

A Control is just a Class and every WidgetA widget you create is an instance of that Class. You can only setup inheritance between classes.

If have a Control named WidgetA that you've created instances of.You can then create a similar type of widget, but with a few differences, by creating a WidgetB class (Control) and create an instance from that.

  1. WidgetA = can.Control({
  2.     ...
  3. });

  4. WidgetB = WidgetA({
  5.     ....
  6. });

Viewing all articles
Browse latest Browse all 3491

Trending Articles