Skip to content

feat: support trusted types for jit compilation #6630

Open
dokson/zod
#2

Description

@atsjo

For instance DOMPurify supports trusted types, you can either supply your own policy, or it will create a default called 'dompurify'.
Trusted types is available for all major browsers now, so this is the way to run dynamic code in a secure way...

ref: #5789 (comment)

Activity

  1. dokson commented on Oct 14, 2026

    @dokson
    Contributor

    @colinhacks fix for this is up on my fork: dokson#2. It routes the JIT's new Function arguments through a "zod" Trusted Types policy, so a CSP with 'trusted-types-eval' keeps the fastpass; nothing changes for pages without Trusted Types. +92 B gzip on classic, mini unchanged.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions