mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 10:22:23 +00:00
docs(class): fixed #1099
This commit is contained in:
parent
4781407a68
commit
664f6850f7
@ -1028,7 +1028,7 @@ A.test(o1) // false
|
||||
A.test(o1.__proto__) // true
|
||||
|
||||
const o2 = {};
|
||||
Object.setPrototypeOf(o2, A);
|
||||
Object.setPrototypeOf(o2, a);
|
||||
A.test(o2) // false
|
||||
A.test(o2.__proto__) // true
|
||||
```
|
||||
@ -1204,3 +1204,4 @@ var y = new Rectangle(3, 4); // 正确
|
||||
上面代码中,`Shape`类不能被实例化,只能用于继承。
|
||||
|
||||
注意,在函数外部,使用`new.target`会报错。
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user