blob: 90a446e6a80c6b8fd7eb5f3481bd0bcc6aba0a12 [file] [log] [blame]
function createElement(parent,child,params){
if(child){
child.prototype = Object.create(parent.prototype);
child.prototype.constructor = child;
child.prototype.parent = parent.prototype;
}else{
var instance = Object.create(parent.prototype,params);
var getType = {};
if(instance && getType.toString.call(instance.init) === '[object Function]'){
instance.init();
}
return instance;
}
}