Not TestedTesting not done, may not work properly
HTML & DOM Security

Trusted Script

Create and inspect TrustedScript objects for safe inline script execution.

Checking support...
Advertisement

Interactive Input Workspace

Ready for input

Web API Execution Output

Result output will be displayed here after processing...

Native JavaScript Code Example (Zero Libraries)

const scriptPolicy = trustedTypes.createPolicy('myScriptPolicy', {
  createScript: string => string
});

About the Trusted Script Web API

TrustedScript objects ensure dynamic script strings originate from verified application policies.

Specification:W3C & WHATWG Web API Standard
Sponsored Content