A string containing the sanitized script.
sanitized is an object created via a Trusted Types policy. The
toString() method returns a string to safely execute as a script.
const sanitized = scriptPolicy.createScript("eval('2 + 2')"); console.log(sanitized.toString());
|Trusted Types |
BCD tables only load in the browser