Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

Post Timeline

Commonmark migration
Source Link

This is an old question, but in ES6 this ability is provided via the Function.name property. The ECMAScript 2015 Language Specification defines how this property is added to a Function instance:

9.2.11 SetFunctionName (F, name, prefix)

The abstract operation SetFunctionName requires a Function argument F, a String or Symbol argument name and optionally a String argument prefix. This operation adds a name property to F by performing the following steps: ...

Unfortunately, this hasn't yet been implemented in all major browsers: It's listed here as not supported in all IE versions, and only partially supported in all other major browsers (with Edge 13 having the best, albeit still partial, support currently).

This is an old question, but in ES6 this ability is provided via the Function.name property. The ECMAScript 2015 Language Specification defines how this property is added to a Function instance:

9.2.11 SetFunctionName (F, name, prefix)

The abstract operation SetFunctionName requires a Function argument F, a String or Symbol argument name and optionally a String argument prefix. This operation adds a name property to F by performing the following steps: ...

Unfortunately, this hasn't yet been implemented in all major browsers: It's listed here as not supported in all IE versions, and only partially supported in all other major browsers (with Edge 13 having the best, albeit still partial, support currently).

This is an old question, but in ES6 this ability is provided via the Function.name property. The ECMAScript 2015 Language Specification defines how this property is added to a Function instance:

9.2.11 SetFunctionName (F, name, prefix)

The abstract operation SetFunctionName requires a Function argument F, a String or Symbol argument name and optionally a String argument prefix. This operation adds a name property to F by performing the following steps: ...

Unfortunately, this hasn't yet been implemented in all major browsers: It's listed here as not supported in all IE versions, and only partially supported in all other major browsers (with Edge 13 having the best, albeit still partial, support currently).

Source Link
RJ Cuthbertson
  • 1.5k
  • 1
  • 20
  • 38

This is an old question, but in ES6 this ability is provided via the Function.name property. The ECMAScript 2015 Language Specification defines how this property is added to a Function instance:

9.2.11 SetFunctionName (F, name, prefix)

The abstract operation SetFunctionName requires a Function argument F, a String or Symbol argument name and optionally a String argument prefix. This operation adds a name property to F by performing the following steps: ...

Unfortunately, this hasn't yet been implemented in all major browsers: It's listed here as not supported in all IE versions, and only partially supported in all other major browsers (with Edge 13 having the best, albeit still partial, support currently).

lang-js

AltStyle によって変換されたページ (->オリジナル) /