标签:target console value zhang nav name efi code fine
w={"navigator":"hehe"}
var handler = {
get(target, key,receiver){
console.log("target",target,receiver);
return Reflect.has(target, key)
? Reflect.get(target, key)
: undefined
},
set(target, key, value){
return Reflect.set(target, key, value);
}
}
w["name"]="zhangsan"
w = new Proxy(w, handler);
console.log(w.name)
标签:target console value zhang nav name efi code fine
原文地址:https://www.cnblogs.com/c-x-a/p/13352522.html