1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 10:22:23 +00:00

docs(proxy): fixed #1167 Proxy get()

This commit is contained in:
ruanyf 2023-08-24 14:20:57 +08:00
parent b1b35cde31
commit 17246d85bb

View File

@ -286,7 +286,7 @@ const proxy = new Proxy({}, {
proxy.getReceiver === proxy // true proxy.getReceiver === proxy // true
``` ```
上面代码中,`proxy`对象的`getReceiver`属性是由`proxy`对象提供的,所以`receiver`指向`proxy`对象。 上面代码中,`proxy`对象的`getReceiver`属性会被`get()`拦截,得到的返回值就是`proxy`对象。
```javascript ```javascript
const proxy = new Proxy({}, { const proxy = new Proxy({}, {