Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Web compatibility issue reported #33

Open
littledan opened this issue Jun 6, 2018 · 4 comments
Open

Web compatibility issue reported #33

littledan opened this issue Jun 6, 2018 · 4 comments

Comments

@littledan
Copy link
Member

littledan commented Jun 6, 2018

A bug was filed 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 have .replace() code specifically looking for .replace('function anonymous() {', '') which no longer works since upgrading to version 66 of Chrome

What do we make of this "compatibility issue"? Should we reconsider #13 ? cc @gsathya

@gsathya gsathya mentioned this issue Jun 6, 2018
@ljharb
Copy link
Member

ljharb commented Jun 6, 2018

Can the reporter be evangelized to change their site, or do we think this is a more widespread problem?

@hax

This comment has been minimized.

@michaelficarra
Copy link
Member

@littledan Perhaps, if we discover that this is a common enough pattern, we should special-case empty parameter lists to omit the newline? Or even go a step further and test for trailing line comments (though this may be hard to do spec-wise).

@littledan
Copy link
Member Author

Or even go a step further and test for trailing line comments (though this may be hard to do spec-wise).

What's the hard part about this? Could we remove trailing line comments from each parameter, in the Function.prototype.toString representation, for example?


I'm not sure why @hax 's comment was marked as off-topic; it seems relevant to me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants