Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/mono/sample/wasm/blazor-frame/BenchmarkEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using Microsoft.JSInterop;

namespace blazor;

public static class BenchmarkEvent
{
public static void Send(IJSRuntime jsRuntime, string name)
{
// jsRuntime will be null if we're in an environment without any
// JS runtime, e.g., the console runner
((IJSInProcessRuntime)jsRuntime)?.Invoke<object>(
"receiveBenchmarkEvent",
name);
}
}