Web SDKv1.0.0

SDKInitOptions.styleNonce

The page's CSP nonce, carried by every stylesheet the SDK injects — the print frame's included. A style-src without 'unsafe-inline' refuses every <style> the SDK adds unless it carries the page's nonce; pass that nonce once. When styleNonce is not given, the SDK reads the nonce a page declares for its tooling as <meta property="csp-nonce" nonce="…">, the convention Vite and others follow. With a nonce in force the Google Fonts link (tools.sign.webFonts) carries it too, so style-src needs no Google origin. The SDK styles its elements through the CSSOM, never with style="…" markup, so style-src-attr needs nothing.

A value that is not base64 or base64url is refused with INVALID_ARGUMENT. A policy that enforces Trusted Types (require-trusted-types-for 'script') is not supported in 1.0. See Installation and support for the full policy.

string

Example

styleNonceTypeScript
await Kernstra.init({
  license: import.meta.env.KERNSTRA_LICENSE,
  styleNonce: nonceFromYourServer,
});

More in Initialization