Insert CSP before authored content. The caller must verify the artifact first. Existing authored CSP remains in place and can only further restrict execution.
Already-verified artifact HTML; never use the result for its hash.
Explicit connection grants and directive replacements.
A srcdoc copy with the CSP first in head.
const protectedHtml = injectNappletCsp(verifiedHtml); Copy
const protectedHtml = injectNappletCsp(verifiedHtml);
Insert CSP before authored content. The caller must verify the artifact first. Existing authored CSP remains in place and can only further restrict execution.