@adcp/sdk API Reference - v14.0.0-beta.6
    Preparing search index...

    Function htmlRender

    • Build an html-variant PreviewRender with output_format: 'html' injected.

      Parameters

      • fields: HtmlRenderFields

      Returns {
          render_id: string;
          output_format: "html";
          preview_html: string;
          role: string;
          dimensions?: { width: number; height: number };
          embedding?: {
              recommended_sandbox?: "";
              requires_https?: boolean;
              supports_fullscreen?: boolean;
              csp_policy?: string;
          };
          renderer?: PreviewRendererMetadata;
      }

      • render_id: string

        Unique identifier for this rendered piece within the variant

      • output_format: "html"

        Discriminator indicating preview_html is provided

      • preview_html: string

        Untrusted HTML. Consumers MUST NOT inject it into the host DOM. Render only as iframe srcdoc with an empty sandbox token set and a caller-enforced restrictive CSP; provider embedding metadata is advisory and MUST NOT loosen that policy.

      • role: string

        Semantic role of this rendered piece. Use 'primary' for main content, 'companion' for associated banners, descriptive strings for device variants or custom roles.

      • Optionaldimensions?: { width: number; height: number }

        Dimensions for this rendered piece

      • Optionalembedding?: {
            recommended_sandbox?: "";
            requires_https?: boolean;
            supports_fullscreen?: boolean;
            csp_policy?: string;
        }

        Optional security and embedding metadata

        • Optionalrecommended_sandbox?: ""

          Empty iframe sandbox token set. Provider metadata MUST NOT grant scripts, same-origin, navigation, popups, forms, downloads, or other capabilities.

        • Optionalrequires_https?: boolean

          Whether this output requires HTTPS for secure embedding

        • Optionalsupports_fullscreen?: boolean

          Whether this output supports fullscreen mode

        • Optionalcsp_policy?: string

          Content Security Policy requirements for embedding

      • Optionalrenderer?: PreviewRendererMetadata