mirror of
https://github.com/PacktPublishing/Web-Development-with-Blazor-Second-Edition.git
synced 2025-12-06 05:32:03 +01:00
17 lines
422 B
C#
17 lines
422 B
C#
using System.Runtime.InteropServices.JavaScript;
|
|
using System.Runtime.Versioning;
|
|
namespace BlazorWebAssembly.Client.JSInteropSamples;
|
|
|
|
[SupportedOSPlatform("browser")]
|
|
public partial class JSToStaticNET
|
|
{
|
|
[JSExport]
|
|
internal static string GetAMessageFromNET()
|
|
{
|
|
return "This is a message from .NET";
|
|
}
|
|
|
|
[JSImport("showMessage", "jstonet")]
|
|
internal static partial void ShowMessage();
|
|
}
|