Newly Available
Security
id: trusted-types
Trusted types
Trusted types allow you to lock down insecure parts of the DOM API and prevent client-side cross-site scripting (XSS) attacks.
Baseline Status:
Achieved Newly Available on Feb 24, 2026 across core engines.
Desktop Browser Engine Support
Google Chrome
83
Supported
Mozilla Firefox
148
Supported
Apple Safari
26
Supported
Microsoft Edge
83
Supported
Mobile Browser Engine Support
Chrome Android
83
Firefox Android
148
Safari iOS
26
Specifications and References
MDN Browser Compat Data Keys:
api.Element.innerHTML.enforces_trusted_types ↗
api.HTMLScriptElement.innerText.enforces_trusted_types ↗
api.HTMLScriptElement.src.enforces_trusted_types ↗
api.HTMLScriptElement.text.enforces_trusted_types ↗
api.HTMLScriptElement.textContent.enforces_trusted_types ↗
api.ShadowRoot.innerHTML.enforces_trusted_types ↗
api.TrustedHTML ↗
api.TrustedHTML.toJSON ↗
api.TrustedHTML.toString ↗
api.TrustedScript ↗
api.TrustedScript.toJSON ↗
api.TrustedScript.toString ↗
api.TrustedScriptURL ↗
api.TrustedScriptURL.toJSON ↗
api.TrustedScriptURL.toString ↗
api.TrustedTypePolicy ↗
api.TrustedTypePolicy.createHTML ↗
api.TrustedTypePolicy.createScript ↗
api.TrustedTypePolicy.createScriptURL ↗
api.TrustedTypePolicy.name ↗
api.TrustedTypePolicyFactory ↗
api.TrustedTypePolicyFactory.createPolicy ↗
api.TrustedTypePolicyFactory.defaultPolicy ↗
api.TrustedTypePolicyFactory.emptyHTML ↗
api.TrustedTypePolicyFactory.emptyScript ↗
api.TrustedTypePolicyFactory.getAttributeType ↗
api.TrustedTypePolicyFactory.getPropertyType ↗
api.TrustedTypePolicyFactory.isHTML ↗
api.TrustedTypePolicyFactory.isScript ↗
api.TrustedTypePolicyFactory.isScriptURL ↗
api.setInterval.code_param_enforces_trusted_types ↗
api.setTimeout.code_param_enforces_trusted_types ↗
api.trustedTypes ↗
http.headers.Content-Security-Policy.require-trusted-types-for ↗
http.headers.Content-Security-Policy.trusted-types ↗