JSconsoleExtensionsLib NuGet Package

For .Net 5, library of 23 IJSRuntime extension methods gives simplified access to the complete set of JavaScript console functions from Blazor applications.

Plus, for convenience, implements 3 common window functions: alert(), confirm() and prompt() and two functions for setting web page titles and icons: title() and icon().

Examples: jsRuntime.log("Message");
jsRuntime.prompt("Please enter your age","35");

Usage:
1. Add JSconsoleExtensionsLib nuget package to your project or solution.
2.

Add "@using JSconsoleExtensionsLib" to your _Imports.razor.
3. Add "@inject IJSRuntime console" to your .razor page or component.

For repeated display, use like: console.error("Error Message");
console.log("Message");

For one-time display, use like: console.error("Error Message", true);

To turn off all console functions: JSconsoleExtensions.enabled = false;

For a complete list of JavaScript console functions see: https://developer.mozilla.org/en-US/docs/Web/API/Console.




Got any JSconsoleExtensionsLib Question?





Info

Version: 5.0.2
Author(s): [email protected]
Last Update: Saturday, January 23, 2021
.NET Fiddle: Create the first Fiddle
NuGet Url: https://www.nuget.org/packages/JSconsoleExtensionsLib


Install
Install-Package JSconsoleExtensionsLib
dotnet add package JSconsoleExtensionsLib
paket add JSconsoleExtensionsLib
JSconsoleExtensionsLib Download (Unzip the "nupkg" after downloading)



Tags



STATS

must-have-score

1

avg-downloads-per-day

1

days-since-last-release

1429