add static property inherit warning for IE <= 9 to README - closes #116

This commit is contained in:
Sebastian McKenzie 2014-11-03 13:09:36 +11:00
parent 74f11dfddf
commit c8139317ee

View File

@ -102,9 +102,9 @@ map embedded in a comment at the bottom.
Compile the entire `src` directory and output it to the `lib` directory. Compile the entire `src` directory and output it to the `lib` directory.
$ 6to5 src --out-dir lib $ 6to5 src --out-dir lib
Compile the entire `src` directory and output it to the one concatenated file. Compile the entire `src` directory and output it to the one concatenated file.
$ 6to5 src --out-file script-compiled.js $ 6to5 src --out-file script-compiled.js
Pipe a file in via stdin and output it to `script-compiled.js` Pipe a file in via stdin and output it to `script-compiled.js`
@ -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), 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. 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 ### Generators
The [regenerator runtime](https://github.com/facebook/regenerator/blob/master/runtime.js) The [regenerator runtime](https://github.com/facebook/regenerator/blob/master/runtime.js)