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

Reopen class in canJs

$
0
0

As a class gets bigger and bigger it becomes harder to maintain. So I would love to divide some of my classes in multiple files. Defining the class in a file, something like:

var animal = can.Construct({ someClassMethod: function() {...} }, { somePrototypemethod: function() {...} });

then later in a separate file I would love to reopen this class, and add new class methods/properties, and prototype methods/properties to it.

Is this possible in canJS? If no, what should be a possible workaround?


Viewing all articles
Browse latest Browse all 3491

Trending Articles