Excubo.Blazor.ScriptInjection 1.0.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package Excubo.Blazor.ScriptInjection --version 1.0.5                
NuGet\Install-Package Excubo.Blazor.ScriptInjection -Version 1.0.5                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Excubo.Blazor.ScriptInjection" Version="1.0.5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Excubo.Blazor.ScriptInjection --version 1.0.5                
#r "nuget: Excubo.Blazor.ScriptInjection, 1.0.5"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Excubo.Blazor.ScriptInjection as a Cake Addin
#addin nuget:?package=Excubo.Blazor.ScriptInjection&version=1.0.5

// Install Excubo.Blazor.ScriptInjection as a Cake Tool
#tool nuget:?package=Excubo.Blazor.ScriptInjection&version=1.0.5                

This library brings the script tag to Blazor. Since components can occur any number of times, the usage of script tags in components is usually frowned upon. The Script component in Excubo.Blazor.ScriptInjection is different, as it makes sure that the source file is only put into the page's body once.

This can be used to lazily load javascript sources for any component that requires javascript. As a component library author, you can use this to relieve your users of the burden of adding script tags to their pages' <head>. Simply add <Script Src="_content/My.Library/code.js"> to any component in your library that requires that file. Excubo.Blazor.ScriptInjection makes sure the script gets loaded once and only once, regardless of how many components you have, and regardless of how many components your users use.

Usage

1. Add ScriptInjection to your services
    //...
    //using Excubo.Blazor.ScriptInjection;
    services.AddScriptInjection();
    //...
2. Use the Script component
<h3>My component requiring some js</h3>
<Script Src="path/to/code.js" Async="true" Defer="false" />

Note: Async and Defer are false by default. It is recommended to use these options wherever possible to improve page performance.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 is compatible.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Excubo.Blazor.ScriptInjection:

Package Downloads
Basyc.MessageBus.Manager.Presentation.BlazorLibrary

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.1.7 1,807 12/1/2022
3.1.6 764 4/15/2022
3.1.4 450 3/9/2022
3.1.2 544 2/10/2022
3.1.0 490 11/9/2021
3.0.47 437 10/22/2021
3.0.45 445 9/15/2021
3.0.37 482 7/19/2021
3.0.33 378 6/11/2021
3.0.29 338 5/12/2021
3.0.25 842 4/7/2021
3.0.21 372 3/9/2021
3.0.17 404 3/3/2021
3.0.15 453 2/10/2021
3.0.11 454 1/13/2021
3.0.7 461 12/9/2020
3.0.5 458 11/13/2020
3.0.4 429 11/10/2020
3.0.3 8,340 10/13/2020
3.0.2 3,763 9/8/2020
3.0.1 2,878 8/12/2020
3.0.0 747 8/5/2020
2.0.2 2,868 6/28/2020
2.0.1 519 6/25/2020
2.0.0 516 6/25/2020
1.0.5 486 6/15/2020
1.0.4 492 5/14/2020
1.0.3 480 5/13/2020
1.0.2 496 5/13/2020
1.0.1 490 4/28/2020
1.0.0 583 3/31/2020