G
George
Hi,
I am wondering what is the grace way to determine whether an object
exists in the current function Call object or not. Namely, how to
determine if an object is locally defined or not. For example, in the
following script, how to implement the function IsDefinedLocally?
var x = {a:1};
function f() {
var ref;
ref = x;
IsDefinedLocally(ref); //should return false
var loc_obj = {a:1};
ref = loc_obj;
IsDefinedLocally(ref); //should return true
}
Thanks,
Yan Huang
I am wondering what is the grace way to determine whether an object
exists in the current function Call object or not. Namely, how to
determine if an object is locally defined or not. For example, in the
following script, how to implement the function IsDefinedLocally?
var x = {a:1};
function f() {
var ref;
ref = x;
IsDefinedLocally(ref); //should return false
var loc_obj = {a:1};
ref = loc_obj;
IsDefinedLocally(ref); //should return true
}
Thanks,
Yan Huang