U E D R , A S I H C RSS

안혁준/class.js (rev. 1.5)

안혁준/class.js


소스코드

`
/**
  • @author Blue Mir
  • /
Function.prototype.extend = function(superclass)
{

if(this.prototype.superclass)
throw new SyntaxError("이미 superclass를 가지고 있습니다.");

var proto = new superclass();
for(var p in proto)
{
if(proto.hasOwnProperty(p)) delete protop;
}
proto.constructor = this;
proto.superclass = superclass;
this.prototype = proto;
return this;
};
Function.prototype.implement = function()
{
for(var i = 0; i < arguments.length; i++)
{
var implementClass = argumentsi;
for(var p in implementClass.prototype)
{
var fn = implementClass.prototypep;
if(typeof fn == "function")
{
this.prototypep = fn;
}
}
}
return this;
};
`

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:30:20
Processing time 0.0166 sec