Chromium Code Reviews| Index: docs/es6_chromium.md |
| diff --git a/docs/es6_chromium.md b/docs/es6_chromium.md |
| index 946a48a585393dfd2e0bc97d724debf7510cdda0..0c13b5c8c4d50fd881c926d526f29ddbffe17e24 100644 |
| --- a/docs/es6_chromium.md |
| +++ b/docs/es6_chromium.md |
| @@ -183,6 +183,42 @@ this document. |
| --- |
| +## Classes |
| + |
| +OOP-style and boilerplate-free class syntax, including inheritance, `super()`, |
| +static members, and getters and setters. |
| + |
| +**Usage Example:** |
| + |
| +```js |
| +class Shape { |
| + constructor(x, y) { |
| + this.x = x; |
| + this.y = y; |
| + } |
| +} |
| +// Note: let Shape = class {...}; is also valid. |
| + |
| +class Rectangle extends Shape { |
| + constructor(x, y, width, height) { |
| + super(id, x, y); |
| + this.width = width; |
| + this.height = height; |
| + } |
| + |
| + static goldenRectangle() { |
| + var PHI = (1 + Math.sqrt(5)) / 2; |
| + return new Rectangle(0, 0, PHI, 1); |
| + } |
| +} |
| +``` |
| + |
| +**Documentation:** [link](http://www.ecma-international.org/ecma-262/6.0/#sec-class-definitions) |
| + |
| +**Discussion Notes / Link to Thread:** |
| +https://groups.google.com/a/chromium.org/d/msg/chromium-dev/S1h-0m2ohOw/jyaiMGDlCwAJ |
|
Dan Beam
2017/06/16 00:43:41
nvm, i found this
dpapad
2017/06/16 00:52:01
Ack.
|
| +--- |
| + |
| # Banned Features |
| The following features are banned for Chromium development. |
| @@ -264,42 +300,6 @@ frobber.isFrobbing = false; // Works. |
| --- |
| -## Classes |
| - |
| -OOP-style and boilerplate-free class syntax, including inheritance, `super()`, |
| -static members, and getters and setters. |
| - |
| -**Usage Example:** |
| - |
| -```js |
| -class Shape { |
| - constructor(x, y) { |
| - this.x = x; |
| - this.y = y; |
| - } |
| -} |
| -// Note: let Shape = class {...}; is also valid. |
| - |
| -class Rectangle extends Shape { |
| - constructor(x, y, width, height) { |
| - super(id, x, y); |
| - this.width = width; |
| - this.height = height; |
| - } |
| - |
| - static goldenRectangle() { |
| - var PHI = (1 + Math.sqrt(5)) / 2; |
| - return new Rectangle(0, 0, PHI, 1); |
| - } |
| -} |
| -``` |
| - |
| -**Documentation:** [link](http://www.ecma-international.org/ecma-262/6.0/#sec-class-definitions) |
| - |
| -**Discussion Notes / Link to Thread:** |
| - |
| ---- |
| - |
| ## Block Scope Functions |
| **Usage Example:** |