add static property inherit warning for IE <= 9 to README - closes #116
This commit is contained in:
parent
74f11dfddf
commit
c8139317ee
17
README.md
17
README.md
@ -283,6 +283,23 @@ If you're inheriting from a class then static properties are inherited from it
|
||||
via [\_\_proto\_\_](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto),
|
||||
this is widely supported but you may run into problems with much older browsers.
|
||||
|
||||
**NOTE:** `__proto__` is not supported on IE <= 9 so static properties
|
||||
**will not** be inherited. A possible workaround is to use `super();`:
|
||||
|
||||
```javascript
|
||||
class Foo {
|
||||
static foo() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class Bar extends Foo {
|
||||
static foo() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Generators
|
||||
|
||||
The [regenerator runtime](https://github.com/facebook/regenerator/blob/master/runtime.js)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user