Mercurial > js4py
diff core-javascript/core-javascript-work/library.js @ 150:5118d0e38ba4 core-javascript-latex
$ hg merge core-javascript # into core-javascript-latex
| author | jf3243 |
|---|---|
| date | Tue, 01 Nov 2011 08:58:38 +0000 |
| parents | 20d76c716c9d |
| children | b774913eb242 |
line wrap: on
line diff
--- a/core-javascript/core-javascript-work/library.js Mon Oct 31 14:22:00 2011 +0000 +++ b/core-javascript/core-javascript-work/library.js Tue Nov 01 08:58:38 2011 +0000 @@ -1,25 +1,25 @@ -// start create -var create = function(parent){ - - var tmp = function(){}; - tmp.prototype = parent; - var child = new tmp(); - - return child; -}; -// end create - - -// start SimpleClass -var SimpleClass = function(prototype){ - - var cls = function(){ - - var instance = create(prototype); - instance.__init__.apply(instance, arguments); - return instance; - }; - - return cls; -}; -// end SimpleClass +// start create +var create = function(parent){ + + var tmp = function(){}; + tmp.prototype = parent; + var child = new tmp(); + + return child; +}; +// end create + + +// start SimpleClass +var SimpleClass = function(prototype){ + + var cls = function(){ + + var instance = create(prototype); + instance.__init__.apply(instance, arguments); + return instance; + }; + + return cls; +}; +// end SimpleClass
