mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-29 05:42:20 +00:00
Update reflect.md
This commit is contained in:
parent
584ee0dc47
commit
7bad01cae6
@ -511,6 +511,8 @@ Reflect.ownKeys(myObject)
|
||||
// ['foo', 'bar', Symbol(baz), Symbol(bing)]
|
||||
```
|
||||
|
||||
如果第一个参数不是对象,`Reflect.ownKeys`方法会报错。
|
||||
|
||||
## 实例:使用 Proxy 实现观察者模式
|
||||
|
||||
观察者模式(Observer mode)指的是函数自动观察数据对象,一旦对象有变化,函数就会自动执行。
|
||||
|
Loading…
x
Reference in New Issue
Block a user