PayFanout API reference
    Preparing search index...

    Interface InjectStylesheetOptions

    Attributes injectStylesheet puts on the <link rel="stylesheet"> it creates, all set before href and before insertion. Without options the link carries only rel and href.

    interface InjectStylesheetOptions {
        crossOrigin?: "anonymous" | "use-credentials";
        integrity?: string;
        nonce?: string;
    }
    Index
    crossOrigin?: "anonymous" | "use-credentials"

    The link's crossorigin attribute. Defaults to "anonymous" when integrity is set, since the browser checks a cross-origin file only when it is fetched in CORS mode; without integrity it is set only when given.

    integrity?: string

    Subresource Integrity metadata, set verbatim as the link's integrity attribute. A sheet that does not match fails to load, and a value holding no well-formed sha256, sha384 or sha512 token rejects with a non-retryable invalid_request, as InjectScriptOptions.integrity does, and nothing is injected.

    nonce?: string

    A Content-Security-Policy nonce, set as the link's nonce attribute. The browser reads it when it starts fetching the sheet, as the link is inserted, and does not fetch again for a nonce set later; a policy whose style-src lists 'nonce-<value>' then allows the sheet. A value isValidCspNonce refuses rejects with a non-retryable invalid_request, and nothing is injected.