Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update to respins of libs with docs

  • Loading branch information...
commit a89f9c109ff22b1984fd2122b939fd685921c09e 1 parent 7274439
Peter Michaux authored
6 lib/evento/evento.js
View
@@ -25,6 +25,12 @@ The methods of an event target object are inspired by the DOM2 standard.
*/
evento.EventTarget = function() {};
+
+/**
+
+@property evento.EventTarget.superConstructor
+
+*/
evento.EventTarget.superConstructor = Object;
(function() {
10 lib/hijos/hijos.js
View
@@ -33,6 +33,11 @@ hijos.Leaf = function() {
this.nextSibling = null;
};
+/**
+
+@property hijos.Leaf.superConstructor
+
+*/
hijos.Leaf.superConstructor = Object;
/**
@@ -131,6 +136,11 @@ hijos.Node = function() {
this.lastChild = null;
};
+/**
+
+@property hijos.Node.superConstructor
+
+*/
hijos.Node.superConstructor = hijos.Leaf;
// Inherit from hijos.Leaf. Not all browsers have Object.create
5 lib/hormigas/hormigas.js
View
@@ -66,6 +66,11 @@ Harmony Set proposal and the `Array.prototype` iterators.
}
};
+/**
+
+@property hormigas.ObjectSet.superConstructor
+
+*/
hormigas.ObjectSet.superConstructor = Object;
/**
7 src/Controller.js
View
@@ -86,6 +86,13 @@ maria.Controller = function() {};
/**
+@property maria.Controller.superConstructor
+
+*/
+maria.Controller.superConstructor = Object;
+
+/**
+
The destroy method.
*/
7 src/ElementView.js
View
@@ -175,6 +175,13 @@ maria.ElementView = function(model, controller, doc) {
this.setDocument(doc);
};
+/**
+
+@property maria.ElementView.superConstructor
+
+*/
+maria.ElementView.superConstructor = maria.View;
+
maria.ElementView.prototype = maria.create(maria.View.prototype);
maria.ElementView.prototype.constructor = maria.ElementView;
7 src/Model.js
View
@@ -96,6 +96,13 @@ maria.Model = function() {
evento.EventTarget.call(this);
};
+/**
+
+@property maria.Model.superConstructor
+
+*/
+maria.Model.superConstructor = evento.EventTarget;
+
maria.Model.prototype = maria.create(evento.EventTarget.prototype);
maria.Model.prototype.constructor = maria.Model;
7 src/SetModel.js
View
@@ -177,6 +177,13 @@ maria.SetModel = function() {
maria.Model.call(this);
};
+/**
+
+@property maria.SetModel.superConstructor
+
+*/
+maria.SetModel.superConstructor = maria.Model;
+
maria.SetModel.prototype = maria.create(maria.Model.prototype);
maria.SetModel.prototype.constructor = maria.SetModel;
7 src/SetView.js
View
@@ -52,6 +52,13 @@ maria.SetView = function() {
maria.ElementView.apply(this, arguments);
};
+/**
+
+@property maria.SetView.superConstructor
+
+*/
+maria.SetView.superConstructor = maria.ElementView;
+
maria.SetView.prototype = maria.create(maria.ElementView.prototype);
maria.SetView.prototype.constructor = maria.SetView;
7 src/View.js
View
@@ -142,6 +142,13 @@ maria.View = function(model, controller) {
this.setController(controller);
};
+/**
+
+@property maria.View.superConstructor
+
+*/
+maria.View.superConstructor = maria.Node;
+
maria.View.prototype = maria.create(maria.Node.prototype);
maria.View.prototype.constructor = maria.View;
4 tst/Controller-suite.js
View
@@ -2,6 +2,10 @@
buster.testCase('Controller Suite', {
+ "test Controller has superConstructor Object": function() {
+ assert.same(Object, maria.Controller.superConstructor);
+ },
+
"test model is undefined to start": function() {
var c = new maria.Controller();
assert.same(undefined, c.getModel());
4 tst/ElementView-suite.js
View
@@ -2,6 +2,10 @@
buster.testCase('ElementView Suite', {
+ "test ElementView has superConstructor View": function() {
+ assert.same(maria.View, maria.ElementView.superConstructor);
+ },
+
"test calling constructor with parameters sets them in new instance": function() {
var model = new maria.Model();
var controller = new maria.Controller();
4 tst/Model-suite.js
View
@@ -2,6 +2,10 @@
buster.testCase('Model Suite', {
+ "test Model has superConstructor evento.EventTarget": function() {
+ assert.same(evento.EventTarget, maria.Model.superConstructor);
+ },
+
"test models have EventTarget interface": function() {
var m = new maria.Model();
4 tst/SetModel-suite.js
View
@@ -2,6 +2,10 @@
buster.testCase('SetModel Suite', {
+ "test SetModel has superConstructor Model": function() {
+ assert.same(maria.Model, maria.SetModel.superConstructor);
+ },
+
"test has, add, and delete still work": function() {
var s = new maria.SetModel();
4 tst/SetView-suite.js
View
@@ -2,6 +2,10 @@
buster.testCase('SetView Suite', {
+ "test SetView has superConstructor ElementView": function() {
+ assert.same(maria.ElementView, maria.SetView.superConstructor);
+ },
+
"test when element added to set the view created by createChildView is appended to the set view": function() {
var setView = new maria.SetView();
var setModel = new maria.SetModel();
4 tst/View-suite.js
View
@@ -2,6 +2,10 @@
buster.testCase('View Suite', {
+ "test View has superConstructor Node": function() {
+ assert.same(maria.Node, maria.View.superConstructor);
+ },
+
"test calling constructor with parameters sets them in new instance": function() {
var model = new maria.Model();
var controller = new maria.Controller();
Please sign in to comment.
Something went wrong with that request. Please try again.