dillon1000/react

Commit

Remove special casing of toString values when enableTrustedTypesIntegration (#17774)

* Remove toString of dangerouslySetInnerHTML

As far as I can tell, the toString call was added here:

https://github.com/facebook/react/commit/caae627cd557812d28d11237b34bff6c661ea8bc#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.

* Remove special casing of toString values when enableTrustedTypesIntegration

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.
Browse files
Changed paths4 files
First-parent comparison
M packages/react-dom/src/client/DOMPropertyOperations.js ModifiedM packages/react-dom/src/client/ToStringValue.js ModifiedD packages/react-dom/src/client/setAttribute.js DeletedM packages/react-dom/src/client/setInnerHTML.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…