Uh oh!
There was an error while loading. Please reload this page.
[flags] make enableTrustedTypesIntegration dynamic - #35646
Conversation
Sets the dynamic fork to VARIANT to ensure all tests exercise that code path and enables the integration in experimental releases.
rickhanlonii
left a comment
There was a problem hiding this comment.
To roll this out I need to test it at meta, so we're not ready to enable this in experimental yet.
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. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
rickhanlonii
commented
Jan 28, 2026
@hybrist yeah, i pushed to this branch to switch to 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. |
enableTrustedTypesIntegration dynamichybrist
commented
Jan 28, 2026
Thanks for the help getting this into shape! Sorry, could've caught the flag testing pattern myself. :) |
Comparing: 8c34556...a84f095 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Rick Hanlon <rickhanlonii@meta.com> DiffTrain build for [d4d099f](react@d4d099f)
Co-authored-by: Rick Hanlon <rickhanlonii@meta.com> DiffTrain build for [d4d099f](react@d4d099f)
In #35646 I thought there was a bug in trusted types, but the bug is in jsdom. For trusted types we still want to check the coersion and throw for a good dev warning, but prod will also throw becuase the browser will implicitly coerce to a string. This ensures there's no behavior difference between dev and prod. So the right fix is to add in the JSDOM hack that's used in `ReactDOMSelect-test.js`.
Set the dynamic fork to VARIANT to ensure all tests exercise the
enableTrustedTypesIntegrationcode 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 (?).