{{JSSidebar("Operators")}}
The new.target
syntax is available in all functions. In constructors, new.target
refers to the constructor that was invoked by new
. In normal function calls, new.target
is {{jsxref("undefined")}}.
Syntax
new.target
Description
TBD
Examples
Using new.target
in function calls
// TBD
Using new.target
in classes
// TBD
Using new.target
in arrow functions
// TBD
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('ES6', '#sec-built-in-function-objects', 'Built-in Function Objects')}} | {{Spec2('ES6')}} | Initial definition. |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | {{CompatNo}} | {{CompatGeckoDesktop(41)}} | {{CompatNo}} | {{CompatNo}} | {{CompatNo}} |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | {{CompatNo}} | {{CompatNo}} | {{CompatGeckoMobile(41)}} | {{CompatNo}} | {{CompatNo}} | {{CompatNo}} |