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
fileVersionProviderIFileVersionProviderThe 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
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
ViewContext
Gets or sets the current view context used to resolve versioned static asset URLs.
[ViewContext]
[HtmlAttributeNotBound]
public ViewContext ViewContext { get; set; }
Property Value
Methods
ProcessAsync(TagHelperContext, TagHelperOutput)
Processes the tag helper and renders the requested JavaScript behaviors.
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters
contextTagHelperContextoutputTagHelperOutput