This repository was archived by the owner on Jan 13, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 22========
33
44JS.Class is a class framework based on [ JavaScriptMVC $.Class] ( http://javascriptmvc.com/docs.html#&who=jQuery.Class )
5- and [ John Resig's Simple JavaScript inheritance] ( http://ejohn.org/blog/simple-javascript-inheritance/ ) .
5+ and [ John Resig's Simple JavaScript inheritance] ( http://ejohn.org/blog/simple-javascript-inheritance/ ) and can be used
6+ with NodeJS or other JavaScript engines.
67
78It encourages a hybrid (as made popular by e.g. Scala) approach between functional and object oriented programming.
89
@@ -14,8 +15,8 @@ Features:
1415- Callback creation
1516
1617
17- Creating a Class
18- ----------------
18+ Creating a Class
19+ ----------------
1920
2021 The following creates a Monster class, static, and prototype members.
2122 The prototype init is called as the constructor. Every time a monster instance is created, the static count is incremented:
@@ -60,10 +61,10 @@ Features:
6061
6162 dragon.fight();
6263 console.log(dagon.health); // health = 8
64+
6365
64-
65- Inheritance
66- -----------
66+ Inheritance
67+ -----------
6768
6869 When a class is extended, all static and prototype properties are available on the new class.
6970 If you overwrite a function, you can call the base class's function by calling this._ super.
@@ -89,10 +90,10 @@ Features:
8990
9091 lochNess.fight();
9192 console.log("Loch Ness fought. Health: " + lochNess.health); // -> 11
93+
9294
93-
94- Callbacks
95- ---------
95+ Callbacks
96+ ---------
9697
9798Class provides a callback function that returns a callback to a method that will always have this set to the class or instance of the class.
9899The following example creates a ResponseHandler class that takes the reponse text and the responses header options as constructor arguments
You can’t perform that action at this time.
0 commit comments