mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 18:32:22 +00:00
fix typo: proxy instead of handler
when handler is empty, proxy (instead of handler) should be equal to target
This commit is contained in:
parent
9ecf067ddf
commit
d56b6eadf9
@ -68,7 +68,7 @@ proxy.a = 'b';
|
||||
target.a // "b"
|
||||
```
|
||||
|
||||
上面代码中,`handler`是一个空对象,没有任何拦截效果,访问`handler`就等同于访问`target`。
|
||||
上面代码中,`handler`是一个空对象,没有任何拦截效果,访问`proxy`就等同于访问`target`。
|
||||
|
||||
一个技巧是将 Proxy 对象,设置到`object.proxy`属性,从而可以在`object`对象上调用。
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user