Skip to content

Conversation

@hybrist
Copy link

@hybrist hybrist commented Jan 27, 2026

Set the dynamic fork to VARIANT to ensure all tests exercise the enableTrustedTypesIntegration code path and enable the integration (e.g. dropping the forced stringification) in experimental releases.

Historically, the main issue was an old jsdom version and IE9 from what I can tell.

Summary

It looks like this was kind of meant to become a default while back (see #27859) and I don't see any clear signal on why it didn't. So this PR is asking the question... maybe it should just happen now?

How did you test this change?

Existing tests are passing with this change. It looks like this also might have already been tested internally at Facebook (?).

Sets the dynamic fork to VARIANT to ensure all tests exercise that code path
and enables the integration in experimental releases.
@meta-cla meta-cla bot added the CLA Signed label Jan 27, 2026
Copy link
Member

@rickhanlonii rickhanlonii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To roll this out I need to test it at meta, so we're not ready to enable this in experimental yet.

@hybrist
Copy link
Author

hybrist commented Jan 28, 2026

Would it be worth to land the VARIANT change without the experimental upgrade? If so, happy to split that out.

@rickhanlonii
Copy link
Member

@hybrist yeah, i pushed to this branch to switch to gate() and remove experimental.

We can merge this and I'll test it. If all goes well, this can probably go to experimental soonish, and could land in a minor.

@rickhanlonii rickhanlonii changed the title Upgrade enableTrustedTypesIntegration to __EXPERIMENTAL__ [flags] make enableTrustedTypesIntegration dynamic Jan 28, 2026
@hybrist
Copy link
Author

hybrist commented Jan 28, 2026

Thanks for the help getting this into shape! Sorry, could've caught the flag testing pattern myself. :)

@react-sizebot
Copy link

react-sizebot commented Jan 28, 2026

Comparing: 8c34556...a84f095

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.84 kB 6.84 kB = 1.88 kB 1.88 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 608.67 kB 608.67 kB = 107.63 kB 107.63 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.84 kB 6.84 kB = 1.88 kB 1.88 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 674.60 kB 674.60 kB = 118.58 kB 118.58 kB
facebook-www/ReactDOM-prod.classic.js = 693.92 kB 693.92 kB = 121.98 kB 121.98 kB
facebook-www/ReactDOM-prod.modern.js = 684.31 kB 684.31 kB = 120.37 kB 120.37 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against a84f095

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants