const escapeHTMLPolicy = trustedTypes.createPolicy("myEscapePolicy", {
createHTML: (string) => string.replace(/</g, "<"),
});
console.log(escapeHTMLPolicy.name); /* "myEscapePolicy" */TrustedTypePolicy: name property / notebook
TrustedTypePolicy: name property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.