function ExtendClass (ChildClass, ParentClass)
{
var BaseParentClass = function(){};
BaseParentClass.prototype = ParentClass.prototype;
var TemporaryParentClass = new BaseParentClass();
for (var property in ChildClass.prototype) {
TemporaryParentClass[property] = ChildClass.prototype[property];
}
ChildClass.prototype = TemporaryParentClass;
ChildClass.prototype.super = ParentClass.prototype;
}
Комментариев нет:
Отправить комментарий