1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-25 19:22:21 +00:00

docs(proxy): edit proxy

This commit is contained in:
ruanyf 2017-11-05 09:25:58 +08:00
parent 2ac6e76b38
commit bbc173988b

View File

@ -288,7 +288,7 @@ const proxy = new Proxy({}, {
proxy.getReceiver === proxy // true
```
上面代码中,`get`方法的第三个参数`receiver`,总是为当前的 Proxy 实例,即`get`方法内部的`this`所指向的那个对象
上面代码中,`get`方法的第三个参数`receiver`,总是为当前的 Proxy 实例。
如果一个属性不可配置configurable和不可写writable则该属性不能被代理通过 Proxy 对象访问该属性会报错。