Classes syntax are part of ES6. The spec in Editor's draft is stable.
IE has classes in preview release . No other browser currently ships classes (Mozilla bug ).
V8 implementation of classes is up-to-date with the latest ES6 spec modulo the limitations noted below.
- Classes are dependent on lexical declarations. Since the latter are currently only supported in strict mode, we currently only support classes in strict mode as well.
- At this time we do not support subclassing built-ins and DOM objects
- Current ES6 specification (in particular, [[CreateAction]] hook that takes arguments) makes design of subclassable exotic (in particular DOM) objects unclear. We intend to work with involved parties on resolving this difficulty, but for now we add an extra limitation to calls to super constructor in subclasses: if a subclass constructor calls a superclass constructor via ‘super(...)’ call, that call must be the first statement of constructor’s body, and arguments to ‘super(...)’ call can not refer to ‘this’.
We intend to lift this restriction in the future, once we clarify the design for exotic objects’ subclassing.
Google Germany GmbH
Dienerstr. 12, 80331 München., DE