The "implementation-dependent String" returned from Function.prototype.toString() is now a fully-specified String, which is a substring of the source code that defines the function. For example, this preserves whitespace and comments between the "function" keyword and the function name identifier. For functions created with CreateDynamicFunction (such as through `new Function()`), the String is fully-specified and includes the parameters passed to CreateDynamicFunction.

Documentation

Specification

Editor's draft

Status in Chromium

Blink>JavaScript>Runtime


Enabled by default (tracking bug) in:

  • Chrome for desktop release 66
  • Chrome for Android release 66
  • Android WebView release 66

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

Owners

Search tags

javascript, es6, ecmascript, es7, esnext, es8,

Last updated on 2020-11-09