-
Notifications
You must be signed in to change notification settings - Fork 48.8k
Remove special casing of toString values when enableTrustedTypesIntegration #17774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
As far as I can tell, the toString call was added here: facebook@caae627#diff-5574f655d491348f422bca600ff6711dR887 It was never really needed. Subsequently when we added Trusted Types, this needed to be changed to a special call but we really should just always let it pass through.
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit ac96bc5:
|
Details of bundled changes.Comparing: f749045...ac96bc5 react-dom
ReactDOM: size: -0.0%, gzip: 0.0% Size changes (stable) |
Details of bundled changes.Comparing: f749045...ac96bc5 react-dom
Size changes (experimental) |
5356ecb
to
09eedd3
Compare
I also removed the fancy typed abstractions. They actually provide more harm than they help. It makes it seem like you should go through them to get to a string or string like object but often you should just special case it at every callsite. Like this one: https://github.com/facebook/react/pull/17322/files#r362947154 The abstractions makes it seem like it can be used in other places but it's really only useful in one place and so we should inline it in that one place. |
…ration As far as I can tell, we only toString in user space because of IE8/9. We don't really support IE8/9 anymore and by the time this flag is on, we should be able to deprecate it. Unless this is also an issue in IE11. I haven't tested yet.
09eedd3
to
ac96bc5
Compare
I think we do support IE9 when Map/Set/rAF polyfills are on. I don't think we added anything that would have broken it yet. But breaking it in 17 makes sense to me. |
As far as I can tell, we only toString in user space because of IE8/9. I tested in IE10 and IE11 and it doesn't seem to be an issue there.
We don't really support IE8/9 anymore and by the time this flag is on, it should be fine to stop supporting IE8/9. Arguably it's already ok to break it since we've done so with other IE8/9 things.