diff --git a/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netstandard2.0.cs b/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netstandard2.0.cs index 02146c7bab..95b9b7956c 100644 --- a/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netstandard2.0.cs +++ b/src/JSInterop/Microsoft.JSInterop/ref/Microsoft.JSInterop.netstandard2.0.cs @@ -52,7 +52,6 @@ namespace Microsoft.JSInterop } public static partial class JSRuntime { - public static Microsoft.JSInterop.IJSRuntime Current { get { throw null; } } public static void SetCurrentJSRuntime(Microsoft.JSInterop.IJSRuntime instance) { } } public abstract partial class JSRuntimeBase : Microsoft.JSInterop.IJSRuntime diff --git a/src/JSInterop/Microsoft.JSInterop/src/JSRuntime.cs b/src/JSInterop/Microsoft.JSInterop/src/JSRuntime.cs index 5a9830fa35..ae097ca68e 100644 --- a/src/JSInterop/Microsoft.JSInterop/src/JSRuntime.cs +++ b/src/JSInterop/Microsoft.JSInterop/src/JSRuntime.cs @@ -11,13 +11,9 @@ namespace Microsoft.JSInterop /// public static class JSRuntime { - private static AsyncLocal _currentJSRuntime - = new AsyncLocal(); + private static readonly AsyncLocal _currentJSRuntime = new AsyncLocal(); - /// - /// Gets the current , if any. - /// - public static IJSRuntime Current => _currentJSRuntime.Value; + internal static IJSRuntime Current => _currentJSRuntime.Value; /// /// Sets the current JS runtime to the supplied instance.