Documentation
    Preparing search index...

    Function injectNappletCsp

    • Insert CSP before authored content. The caller must verify the artifact first. Existing authored CSP remains in place and can only further restrict execution.

      Parameters

      • html: string

        Already-verified artifact HTML; never use the result for its hash.

      • options: NappletCspOptions = {}

        Explicit connection grants and directive replacements.

      Returns string

      A srcdoc copy with the CSP first in head.

      const protectedHtml = injectNappletCsp(verifiedHtml);