How to do javascript subclassing
In : linux, mysql, Uncategorized, Posted by admin on Mar.03, 2009
http://www.golimojo.com/etc/js-subclass.html
function subclass(constructor, superConstructor)
{
function surrogateConstructor()
{
}
surrogateConstructor.prototype = superConstructor.prototype;
var prototypeObject = new surrogateConstructor();
prototypeObject.constructor = constructor;
constructor.prototype = prototypeObject;
}
Tags : javascript
No comments for this entry yet...