class B extends A calls A.extended(B)

This commit is contained in:
Sam Stephenson
2010-07-18 14:22:07 -05:00
parent 989d539af3
commit 5678bf10fd
3 changed files with 26 additions and 2 deletions

View File

@@ -1479,9 +1479,10 @@ UTILITIES: {
function(child, parent) {
var ctor = function(){ };
ctor.prototype = parent.prototype;
child.__superClass__ = parent.prototype;
child.prototype = new ctor();
child.prototype.constructor = child;
if (typeof parent.extended === "function") parent.extended(child);
child.__superClass__ = parent.prototype;
}
"""