Proxy 里面set 方法里的this指向?
Proxy 里面set 方法里的this指向?
const ob = {
name: "lala",
}
const obProxy = new Proxy(ob, {
set: function(target, key, newValue) {
console.log('99999', this, this === obProxy);
target[key] = newValue
},
get: function(target, key) {
return target[key]
}
})
obProxy.name = 123

this指向以及原因