Skip to content

Commit fde96be

Browse files
authored
Cross-link features for ImportAsync (#36524)
1 parent 27f16cb commit fde96be

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

  • aspnetcore/client-side/dotnet-interop

aspnetcore/client-side/dotnet-interop/index.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to run .NET from JavaScript with [JSImport]/[JSExport] in
55
monikerRange: '>= aspnetcore-7.0'
66
ms.author: wpickett
77
ms.custom: mvc
8-
ms.date: 08/08/2024
8+
ms.date: 12/19/2025
99
uid: client-side/dotnet-interop/index
1010
---
1111
# JavaScript `[JSImport]`/`[JSExport]` interop in .NET WebAssembly
@@ -123,6 +123,21 @@ Depending on the platform that's loading WebAssembly, a dot-prefixed URL, such a
123123
> [!IMPORTANT]
124124
> If JS is loaded from a JavaScript module, then `[JSImport]` attributes must include the module name as the second parameter. For example, `[JSImport("globalThis.callAlert", "ExampleShim")]` indicates the imported method was declared in a JavaScript module named "`ExampleShim`."
125125
126+
:::moniker range=">= aspnetcore-10.0"
127+
128+
<xref:System.Runtime.InteropServices.JavaScript.JSHost.ImportAsync%2A?displayProperty=nameWithType> can take advantage of the following features:
129+
130+
* [Import map for module scripts (Blazor Web Apps)](xref:blazor/fundamentals/static-files#importmap-component)
131+
* [Fingerprinting client-side static assets (standalone Blazor WebAssembly apps)](xref:blazor/fundamentals/static-files#fingerprint-client-side-static-assets-in-standalone-blazor-webassembly-apps)
132+
133+
:::moniker-end
134+
135+
:::moniker range=">= aspnetcore-9.0"
136+
137+
<xref:System.Runtime.InteropServices.JavaScript.JSHost.ImportAsync%2A?displayProperty=nameWithType> can take advantage of an [import map for module scripts](xref:blazor/fundamentals/static-files#importmap-component) in a Blazor Web App.
138+
139+
:::moniker-end
140+
126141
## Type mappings
127142

128143
Parameters and return types in the .NET method signature are automatically converted to or from appropriate JS types at runtime if a unique mapping is supported. This may result in values converted by value or references wrapped in a proxy type. This process is known as *type marshalling*. Use <xref:System.Runtime.InteropServices.JavaScript.JSMarshalAsAttribute%601> to control how the imported method parameters and return types are marshalled.

0 commit comments

Comments
 (0)