I'm having trouble with the following piece of code. The error occurs in the last line:
return p_Function.constructor.name + "(" + v_args + ")";
When I run it on Internet Explorer 8, the function returns undefined(). Howerver, it works perfectly for Google Chrome (returning FunctionName()). I think it's a problem with the "constructor" property, but I can't figure out how to solve it. I'm new to JavaScript, and I'd be glad if I could get some help with this.
Thanks in advance.
getFunctionExecutionString: function(p_Function){
var v_args = "";
if(p_Function.arg) {
for(var k=0; k < p_Function.args.length; k++) {
if(typeof p_Function.args[k] == "string"){
v_args += "\"" + p_Function.args[k].replace(/'/g, "") + "\",";
}
else{
v_args += p_Function.args[k] + ",";
}
}
v_args = trim(v_args,",");
}
return p_Function.constructor.name + "(" + v_args + ")";
}
};