Nucleus .Net Core CMS

HtmlHelpers.AddWebAssemblyHtmlHelper Class

Namespace: Nucleus.ViewFeatures.HtmlHelpers
Assembly: Nucleus.ViewFeatures.dll
Html helper used to register Web Assemblies for dynamically loading.
AddWebAssembly (IHtmlHelper htmlHelper, String assemblyPath)
Register the specified WebAssembly to be dynamically loaded. Use the ~! prefix for the currently executing view path, or ~# for the currently executing extension.
Parameters
Name Type
htmlHelper Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
assemblyPath String
Examples
@Html.AddWebAssembly("~#/bin/MyModule.wasm")
Remarks
Extensions (modules) can use this Html Helper to add scripts to the HEAD block. The scriptPath can contain the tilde (~) character to specify an app-relative path, which should include the extensions folder and your extension folder name, or the scriptPath can contain the ~! for the currently executing view path, or ~# for the currently executing extension.
AddWebAssembly (HttpContext context, String assemblyPath, String version)
Register the specified web assembly to be dynamically loaded by the browser.
Parameters
Name Type
context Microsoft.AspNetCore.Http.HttpContext
assemblyPath String
version String
GetCallerVersion (IHtmlHelper htmlHelper)
Return the version of the assembly which contains the calling controller action.
Parameters
Name Type
htmlHelper Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
GetCoreVersion ()
Return the version of the Nucleus core assemblies.
Remarks
Well-known scripts are hosted by Nucleus.Web, so their version should come from one of the Nucleus core assemblies.
RenderWebAssemblies (IHtmlHelper htmlHelper)
Adds the scripts submitted by AddWebAssembly to the layout. This method is intended for use by the Nucleus Core layout.
Parameters
Name Type
htmlHelper Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper