In an effort to roll off my own object copier for javascript, I want to be able to identify what types each property has. This is my code:
function HandlerFunction(){
}
function item(){
this.any=1;
this.doc=document.createElement('DIV');
this.onclick=new Function('HandlerFunction()');
}
var o={};
o=new item();
o.any.??? = a number indicating 'any' is a custom object name
o.doc.??? = a number indicating doc is an html object name
o.onclick.??? = a number indicating onclick is an even handler name
Is there a function I can use that can replace the question marks that allows me to separate the event handlers, the html elements and custom object names apart from each other so that I don't end up doing recursive copying when iterating through the properties in my future copy function?