Ecma262: `Function.prototype.toString` revision

Created on 12 Aug 2016  ·  9Comments  ·  Source: tc39/ecma262

https://github.com/tc39/Function-prototype-toString-revision by @michaelficarra

Please tag this issue with the “web reality” label. Thanks!

proposal web reality

Most helpful comment

@ljharb

screen shot 2016-08-18 at 03 22 20

Yeah, I don't think that the Function.prototype.toString proposal differs from web reality. It just makes even stronger guarantees than both what was specified and what exists in implementations.

All 9 comments

Let's leave this open until the proposal has been merged into the main spec, so that people looking at https://github.com/tc39/ecma262/labels/web%20reality can get a better view.

I don't think @michaelficarra 's proposal reflects current web reality, as it is not what any particular browser currently ships, as far as I know.

My understanding is that there is a significant percentage that intersects web reality, and for the rest, there isn't cross-browser agreement.

@michaelficarra could you post/point to the data from your presentation about that?

@ljharb

screen shot 2016-08-18 at 03 22 20

Yeah, I don't think that the Function.prototype.toString proposal differs from web reality. It just makes even stronger guarantees than both what was specified and what exists in implementations.

By the way, this is why we have stage 3. We're waiting on implementation feedback to confirm that this is both technically feasible and web compatible before moving it to stage 4.

fwiw, I believe the proposal disagrees from web reality in its treatment of source text occurring prior to the formal parameters in normal function expressions and declarations.

@bakkot That's right. I should have said that I believe it is _web compatible_. So technically different, but not in a way that will break a meaningful number of web pages. But we'll have to wait for implementation feedback (hint, nudge, wink, etc.) before we know this to be true.

@bakkot That change makes sense as it places the proposal consistent with it self.

As @ljharb mentioned: "... there is a significant percentage that intersects web reality, ...", which seems reasonable.

Sure. Just wanted to clarify that "for the rest, there isn't cross-browser agreement" wasn't quite right.

Was this page helpful?
0 / 5 - 0 ratings