Function-prototype-toString-revision
Function-prototype-toString-revision copied to clipboard
:fishing_pole_and_fish: ECMA-262 proposal to update Function.prototype.toString
Static is currently excluded from a method's `toString`: ```js class Ex { static test() { /* hello */ } } console.log(Ex.test.toString()); // => 'test() { /* hello */ }' ```...
In all of {V8, SpiderMonkey, JavaScriptCore, Chakra}, the snippet ``` js (function /**/ \u0061 /**/ ( /**/ ) { /**/ }).toString() ``` produces ``` function a( /**/ ){ /**/ }...
If I understand correctly, the [specified syntax for `NativeFunction`](https://tc39.github.io/Function-prototype-toString-revision/#prod-NativeFunction): > function IdentifierNameopt ( FormalParameters ) { [ native code ] } doesn't specify how spaces are laid out. I expect...
The source string for a concise method, evaluated as an expression, will generally be a syntax error. Thus, there's no clear utility to producing this source. Concise methods should instead...
A [bug was filed](https://bugs.chromium.org/p/chromium/issues/detail?id=835209) against Chrome for the Function.prototype.toString change. The reporter claims it breaks their site, and is recommending users to switch to IE. The reporter said, > We...