Table of Contents

Class HtmxScriptsTagHelper

Namespace
Htmx.Components.TagHelpers
Assembly
Htmx.Components.dll

Tag helper that includes the Htmx.Components client runtime.

[HtmlTargetElement("htmx-scripts")]
public class HtmxScriptsTagHelper : TagHelper, ITagHelper, ITagHelperComponent
Inheritance
HtmxScriptsTagHelper
Implements
Inherited Members
Extension Methods

Constructors

HtmxScriptsTagHelper(IFileVersionProvider)

Initializes a new instance of the HtmxScriptsTagHelper with the required dependencies.

public HtmxScriptsTagHelper(IFileVersionProvider fileVersionProvider)

Parameters

fileVersionProvider IFileVersionProvider

The static asset file version provider.

Properties

Exclude

Gets or sets which scripts to exclude from the default set. Valid values: "page-state-headers", "table-inline-editing", "blur-save-coordination", "request-lifecycle", "error-handling", "authentication-retry"

public string? Exclude { get; set; }

Property Value

string

Include

Gets or sets which scripts to include. If null or empty, includes all scripts. Valid values: "page-state-headers", "table-inline-editing", "blur-save-coordination", "request-lifecycle", "error-handling", "authentication-retry"

public string? Include { get; set; }

Property Value

string

ViewContext

Gets or sets the current view context used to resolve versioned static asset URLs.

[ViewContext]
[HtmlAttributeNotBound]
public ViewContext ViewContext { get; set; }

Property Value

ViewContext

Methods

ProcessAsync(TagHelperContext, TagHelperOutput)

Processes the tag helper and renders the requested JavaScript behaviors.

public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)

Parameters

context TagHelperContext
output TagHelperOutput

Returns

Task