Skip to content
ChartForgeX
Class

HtmlAssetReferences

ChartForgeX.Interactivity.Html

Namespace
ChartForgeX.Interactivity.Html
Assembly
ChartForgeX.Interactivity.Html
Modifiers
sealed
Attributes
Fluent

Makes generated pages reference the interactive runtimes as shared asset files instead of inlining them, so a bundle of many reports ships one copy of each runtime. Write the files with HtmlInteractiveAssetFiles.

Inheritance

  • object
  • HtmlAssetReferences

Usage

Explore 25 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 20

Constructors

public HtmlAssetReferences(string basePath) #

Initializes asset references rooted at basePath.

Parameters

basePath string required
The folder or URL the pages load assets from, for example assets/, ../shared/cfx/, or https://reports.example.test/assets/. A trailing slash is added when missing. Only relative paths and http/https URLs are accepted; network paths (//host, \\server), queries, and fragments are rejected.

Properties

public string BasePath { get; } #

Gets the normalized base path, always ending with /.

public bool IncludeIntegrity { get; set; } #

Gets or sets a value indicating whether script and stylesheet references carry a Subresource Integrity (sha384) attribute. Off by default because browsers skip integrity-checked assets loaded from file:// pages; enable it for hosted bundles. Integrity-checked assets are requested with crossorigin="anonymous", so assets on another origin must be served with CORS headers.

Extension Methods

public static HtmlAssetReferences IncludeIntegrity(HtmlAssetReferences htmlAssetReferences, bool value = true) #

Sets HtmlAssetReferences.IncludeIntegrity: Gets or sets a value indicating whether script and stylesheet references carry a Subresource Integrity (sha384) attribute. Off by default because browsers skip integrity-checked assets loaded from file:// pages; enable it for hosted bundles. Integrity-checked assets are requested with crossorigin="anonymous", so assets on another origin must be served with CORS headers.

Parameters

htmlAssetReferences ChartForgeX.Interactivity.Html.HtmlAssetReferences required
The instance.
value bool = true optional
The value; true when omitted.

Returns

HtmlAssetReferences The same instance.

Examples

// C# initializer or property                    // C# fluent
htmlAssetReferences.IncludeIntegrity = value;    htmlAssetReferences.IncludeIntegrity(value);