mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 18:32:22 +00:00
Merge branch 'gh-pages' of github.com:ruanyf/es6tutorial into gh-pages
This commit is contained in:
commit
5ad3802d84
@ -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