This feature is only shown in the feature list to users with edit access.

Adopt a recent spec change to add a toJSON method to Trusted Types instances, so that they will behave as expected when passed to JSON.stringify.


This follows a recent spec addition, which in turn follows developer feedback, to make sure Trusted Types in JSON.stringify will work as expected. That is, that they'll produce the same result as the stringified TT instance would. Assuming a Trusted Type instance with value "value": - Currently: JSON.stringify(tt) // "{}" - Intended: JSON.stringify(tt) // "\"value\""


Specification link

Specification being incubated in a Community Group

Status in Chromium


No active development

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • No signal
  • No signal
  • No signals


Last updated on 2021-02-03