Soenneker.Blazor.Utils.ModuleImport 2.1.370

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Blazor.Utils.ModuleImport --version 2.1.370                
NuGet\Install-Package Soenneker.Blazor.Utils.ModuleImport -Version 2.1.370                
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="Soenneker.Blazor.Utils.ModuleImport" Version="2.1.370" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Soenneker.Blazor.Utils.ModuleImport --version 2.1.370                
#r "nuget: Soenneker.Blazor.Utils.ModuleImport, 2.1.370"                
#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 Soenneker.Blazor.Utils.ModuleImport as a Cake Addin
#addin nuget:?package=Soenneker.Blazor.Utils.ModuleImport&version=2.1.370

// Install Soenneker.Blazor.Utils.ModuleImport as a Cake Tool
#tool nuget:?package=Soenneker.Blazor.Utils.ModuleImport&version=2.1.370                

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Blazor.Utils.ModuleImport

A Blazor utility library assisting with asynchronous module loading

This library simplifies the process of loading JavaScript modules and provides methods for waiting until a module is loaded and disposing of modules when they are no longer needed.

Features

  • Import JavaScript modules dynamically.
  • Wait until a module is fully loaded.
  • Dispose of JavaScript modules when they are no longer needed.
  • Singleton pattern to ensure that each module is loaded only once.

Installation

To install, add the package to your Blazor project using the .NET CLI:

dotnet add package Soenneker.Blazor.Utils.ModuleImport

Register it in DI:

builder.Services.AddModuleImportUtil();

Example

Here's an example of how to use the ModuleImportUtil in a Blazor component:

@page "/example"
@inject IModuleImportUtil ModuleImportUtil
@implements IAsyncDisposable

<h3>Module Import Example</h3>

<button @onclick="LoadModule">Load Module</button>

@code {
    private async Task LoadModule()
    {
        var module = await ModuleImportUtil.Import("exampleModule");
        await ModuleImportUtil.WaitUntilLoaded("exampleModule");

        // Guaranteed that the module has been added to the DOM, and available at this point
    }

    public async ValueTask DisposeAsync()
    {
        await ModuleImportUtil.DisposeModule("exampleModule");
    }
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
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 Soenneker.Blazor.Utils.ModuleImport:

Package Downloads
Soenneker.Blazor.Utils.ResourceLoader

A Blazor JavaScript interop for dynamically loading scripts, styles, and modules

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.436 0 9/29/2024
2.1.435 0 9/29/2024
2.1.434 0 9/29/2024
2.1.433 0 9/29/2024
2.1.432 11 9/29/2024
2.1.431 8 9/29/2024
2.1.430 64 9/29/2024
2.1.429 23 9/29/2024
2.1.428 25 9/29/2024
2.1.427 108 9/29/2024
2.1.426 213 9/27/2024
2.1.425 81 9/27/2024
2.1.424 28 9/27/2024
2.1.423 85 9/27/2024
2.1.422 29 9/27/2024
2.1.421 75 9/27/2024
2.1.420 135 9/27/2024
2.1.419 97 9/27/2024
2.1.418 36 9/27/2024
2.1.417 166 9/27/2024
2.1.416 32 9/27/2024
2.1.415 30 9/27/2024
2.1.414 116 9/27/2024
2.1.413 35 9/27/2024
2.1.412 202 9/27/2024
2.1.411 82 9/27/2024
2.1.410 28 9/27/2024
2.1.409 89 9/26/2024
2.1.408 32 9/26/2024
2.1.407 105 9/26/2024
2.1.406 32 9/26/2024
2.1.405 104 9/26/2024
2.1.404 140 9/26/2024
2.1.403 62 9/26/2024
2.1.402 37 9/26/2024
2.1.401 32 9/26/2024
2.1.400 84 9/26/2024
2.1.399 27 9/26/2024
2.1.398 34 9/26/2024
2.1.397 178 9/26/2024
2.1.395 114 9/26/2024
2.1.394 150 9/26/2024
2.1.393 35 9/26/2024
2.1.392 78 9/26/2024
2.1.391 31 9/26/2024
2.1.390 408 9/23/2024
2.1.389 146 9/23/2024
2.1.388 78 9/23/2024
2.1.387 142 9/23/2024
2.1.386 51 9/23/2024
2.1.385 174 9/23/2024
2.1.384 230 9/23/2024
2.1.383 52 9/23/2024
2.1.382 163 9/23/2024
2.1.381 54 9/23/2024
2.1.380 136 9/23/2024
2.1.379 51 9/23/2024
2.1.378 58 9/23/2024
2.1.377 51 9/23/2024
2.1.376 411 9/23/2024
2.1.375 47 9/23/2024
2.1.374 433 9/23/2024
2.1.373 191 9/23/2024
2.1.372 51 9/23/2024
2.1.371 471 9/23/2024
2.1.370 62 9/23/2024
2.1.369 111 9/23/2024
2.1.368 55 9/23/2024
2.1.367 325 9/23/2024
2.1.366 63 9/23/2024
2.1.365 218 9/23/2024
2.1.364 147 9/23/2024
2.1.363 62 9/22/2024
2.1.362 589 9/18/2024
2.1.361 75 9/18/2024
2.1.360 69 9/18/2024
2.1.359 184 9/18/2024
2.1.358 67 9/18/2024
2.1.357 162 9/18/2024
2.1.356 61 9/18/2024
2.1.355 71 9/18/2024
2.1.354 59 9/18/2024
2.1.353 67 9/18/2024
2.1.352 544 9/18/2024
2.1.351 65 9/18/2024
2.1.350 229 9/17/2024
2.1.349 68 9/17/2024
2.1.348 129 9/17/2024
2.1.347 96 9/17/2024
2.1.346 172 9/17/2024
2.1.345 69 9/17/2024
2.1.344 211 9/17/2024
2.1.343 72 9/17/2024
2.1.342 70 9/17/2024
2.1.341 234 9/17/2024
2.1.340 61 9/17/2024
2.1.339 80 9/17/2024
2.1.338 236 9/17/2024
2.1.337 58 9/17/2024
2.1.336 255 9/17/2024
2.1.335 230 9/17/2024
2.1.334 54 9/17/2024
2.1.333 67 9/17/2024
2.1.332 254 9/17/2024
2.1.331 137 9/17/2024
2.1.330 172 9/17/2024
2.1.329 76 9/17/2024
2.1.328 69 9/17/2024
2.1.327 782 9/16/2024
2.1.326 258 9/16/2024
2.1.325 78 9/16/2024
2.1.324 76 9/16/2024
2.1.323 276 9/16/2024
2.1.321 854 9/12/2024
2.1.320 81 9/12/2024
2.1.319 220 9/12/2024
2.1.318 84 9/12/2024
2.1.317 68 9/12/2024
2.1.316 79 9/12/2024
2.1.315 256 9/12/2024
2.1.314 342 9/12/2024
2.1.313 89 9/12/2024
2.1.312 244 9/12/2024
2.1.311 96 9/12/2024
2.1.310 233 9/12/2024
2.1.309 87 9/12/2024
2.1.308 267 9/11/2024
2.1.307 89 9/11/2024
2.1.306 244 9/11/2024
2.1.305 90 9/11/2024
2.1.304 214 9/11/2024
2.1.303 93 9/11/2024
2.1.302 74 9/11/2024
2.1.301 433 9/11/2024
2.1.300 72 9/11/2024
2.1.299 71 9/11/2024
2.1.298 345 9/11/2024
2.1.297 90 9/11/2024
2.1.296 92 9/11/2024
2.1.295 91 9/11/2024
2.1.294 75 9/11/2024
2.1.293 616 9/11/2024
2.1.292 87 9/11/2024
2.1.291 650 9/10/2024
2.1.290 95 9/10/2024
2.1.289 179 9/10/2024
2.1.287 592 9/10/2024
2.1.286 90 9/10/2024
2.1.285 88 9/10/2024
2.1.284 88 9/10/2024
2.1.283 254 9/10/2024
2.1.282 83 9/10/2024
2.1.281 83 9/10/2024
2.1.280 543 9/10/2024
2.1.277 317 9/10/2024
2.1.276 76 9/9/2024
2.1.275 158 9/9/2024
2.1.274 78 9/9/2024
2.1.273 340 9/9/2024
2.1.272 79 9/9/2024
2.1.271 83 9/9/2024
2.1.270 89 9/9/2024
2.1.269 75 9/9/2024
2.1.267 80 9/9/2024
2.1.266 78 9/9/2024
2.1.265 929 9/9/2024
2.1.264 79 9/9/2024
2.1.263 260 9/9/2024
2.1.262 675 9/7/2024
2.1.261 77 9/7/2024
2.1.260 291 9/7/2024
2.1.259 81 9/7/2024
2.1.258 323 9/7/2024
2.1.257 76 9/7/2024
2.1.256 88 9/6/2024
2.1.255 358 9/6/2024
2.1.254 177 9/6/2024
2.1.253 75 9/6/2024
2.1.252 271 9/6/2024
2.1.251 343 9/6/2024
2.1.250 80 9/6/2024
2.1.249 228 9/6/2024
2.1.248 79 9/6/2024
2.1.247 78 9/5/2024
2.1.246 66 9/5/2024
2.1.245 414 9/5/2024
2.1.244 199 9/5/2024
2.1.243 84 9/5/2024
2.1.242 322 9/5/2024
2.1.241 66 9/5/2024
2.1.240 200 9/5/2024
2.1.239 81 9/5/2024
2.1.238 84 9/5/2024
2.1.237 90 9/5/2024
2.1.236 74 9/5/2024
2.1.235 647 9/5/2024
2.1.234 187 9/5/2024
2.1.233 84 9/5/2024
2.1.232 93 9/4/2024
2.1.231 71 9/4/2024
2.1.230 688 9/4/2024
2.1.229 334 9/4/2024
2.1.228 207 9/4/2024
2.1.227 194 9/4/2024
2.1.226 195 9/3/2024
2.1.225 83 9/3/2024
2.1.224 78 9/3/2024
2.1.223 97 9/3/2024
2.1.222 294 9/3/2024
2.1.221 280 9/3/2024
2.1.220 79 9/3/2024
2.1.219 87 9/3/2024
2.1.218 71 9/3/2024
2.1.217 311 9/3/2024
2.1.216 100 9/3/2024
2.1.215 66 9/3/2024
2.1.214 873 8/29/2024
2.1.213 75 8/29/2024
2.1.212 61 8/29/2024
2.1.211 186 8/29/2024
2.1.210 71 8/29/2024
2.1.209 81 8/29/2024
2.1.208 76 8/29/2024
2.1.207 695 8/26/2024
2.1.206 189 8/26/2024
2.1.205 90 8/26/2024
2.1.204 201 8/26/2024
2.1.203 88 8/26/2024
2.1.202 84 8/26/2024
2.1.201 512 8/26/2024
2.1.200 407 8/21/2024
2.1.199 113 8/21/2024
2.1.198 220 8/21/2024
2.1.197 294 8/21/2024
2.1.196 96 8/21/2024
2.1.195 91 8/21/2024
2.1.194 91 8/21/2024
2.1.193 349 8/21/2024
2.1.192 114 8/21/2024
2.1.191 279 8/21/2024
2.1.190 90 8/21/2024
2.1.189 110 8/20/2024
2.1.188 95 8/20/2024
2.1.187 343 8/20/2024
2.1.186 367 8/20/2024
2.1.185 111 8/20/2024
2.1.184 93 8/20/2024
2.1.183 359 8/20/2024
2.1.182 98 8/20/2024
2.1.181 107 8/20/2024
2.1.180 107 8/20/2024
2.1.179 104 8/20/2024
2.1.178 103 8/20/2024
2.1.177 747 8/19/2024
2.1.176 415 8/15/2024
2.1.175 169 8/15/2024
2.1.174 195 8/15/2024
2.1.173 202 8/15/2024
2.1.172 174 8/15/2024
2.1.171 97 8/15/2024
2.1.170 268 8/15/2024
2.1.169 100 8/15/2024
2.1.168 646 8/14/2024
2.1.167 272 8/14/2024
2.1.166 95 8/14/2024
2.1.165 99 8/14/2024
2.1.164 96 8/14/2024
2.1.163 245 8/13/2024
2.1.162 490 8/13/2024
2.1.161 395 8/7/2024
2.1.160 83 8/7/2024
2.1.159 230 8/7/2024
2.1.158 174 8/7/2024
2.1.157 79 8/7/2024
2.1.156 83 8/7/2024
2.1.155 86 8/7/2024
2.1.154 223 8/6/2024
2.1.153 91 8/6/2024
2.1.152 202 8/6/2024
2.1.151 72 8/6/2024
2.1.150 655 8/1/2024
2.1.149 225 8/1/2024
2.1.148 74 8/1/2024
2.1.147 199 8/1/2024
2.1.146 159 8/1/2024
2.1.145 88 8/1/2024
2.1.144 289 8/1/2024
2.1.143 75 8/1/2024
2.1.142 119 8/1/2024
2.1.141 72 8/1/2024
2.1.140 595 7/25/2024
2.1.139 207 7/25/2024
2.1.138 103 7/25/2024
2.1.137 130 7/25/2024
2.1.136 147 7/25/2024
2.1.135 149 7/25/2024
2.1.134 123 7/25/2024
2.1.133 183 7/25/2024
2.1.132 79 7/25/2024
2.1.131 232 7/25/2024
2.1.130 47 7/25/2024
2.1.129 133 7/24/2024
2.1.128 64 7/24/2024
2.1.127 51 7/24/2024
2.1.126 130 7/24/2024
2.1.125 38 7/24/2024
2.1.124 991 7/20/2024
2.1.123 126 7/20/2024
2.1.122 124 7/20/2024
2.1.121 87 7/20/2024
2.1.120 131 7/20/2024
2.1.119 91 7/20/2024
2.1.118 169 7/20/2024
2.1.117 78 7/20/2024
2.1.116 624 7/17/2024
2.1.115 156 7/17/2024
2.1.114 342 7/14/2024
2.1.113 83 7/14/2024
2.1.112 237 7/14/2024
2.1.111 89 7/14/2024
2.1.110 90 7/14/2024
2.1.109 257 7/14/2024
2.1.108 84 7/14/2024
2.1.107 85 7/14/2024
2.1.106 87 7/14/2024
2.1.105 311 7/14/2024
2.1.104 82 7/14/2024
2.1.103 535 7/10/2024
2.1.102 84 7/10/2024
2.1.101 73 7/10/2024
2.1.100 92 7/10/2024
2.1.99 71 7/10/2024
2.1.98 77 7/10/2024
2.1.97 89 7/10/2024
2.1.96 88 7/10/2024
2.1.95 72 7/10/2024
2.1.94 79 7/10/2024
2.1.93 663 7/10/2024
2.1.92 81 7/10/2024
2.1.91 192 7/10/2024
2.1.90 83 7/10/2024
2.1.89 80 7/10/2024
2.1.88 146 7/10/2024
2.1.87 79 7/10/2024
2.1.86 141 7/10/2024
2.1.85 82 7/10/2024
2.1.84 187 7/10/2024
2.1.83 75 7/10/2024
2.1.82 159 7/10/2024
2.1.81 91 7/10/2024
2.1.79 154 7/10/2024
2.1.78 155 7/10/2024
2.1.77 91 7/10/2024
2.1.76 176 7/9/2024
2.1.73 149 7/9/2024
2.1.72 73 7/9/2024
2.1.71 91 7/9/2024
2.1.70 920 7/9/2024
2.1.69 77 7/9/2024
2.1.68 73 7/9/2024
2.1.67 71 7/9/2024
2.1.66 1,384 7/9/2024
2.1.65 87 7/9/2024
2.1.64 369 7/9/2024
2.1.63 82 7/9/2024
2.1.62 86 7/9/2024
2.1.61 90 7/9/2024
2.1.60 429 7/9/2024
2.1.59 92 7/9/2024
2.1.57 79 7/8/2024
2.1.56 101 7/8/2024
2.1.55 95 7/8/2024
2.1.54 452 7/8/2024
2.1.53 84 7/8/2024
2.1.52 215 7/8/2024
2.1.51 97 7/8/2024
2.1.50 442 7/8/2024
2.1.49 131 7/8/2024
2.1.48 198 7/8/2024
2.1.47 87 7/8/2024
2.1.46 345 7/8/2024
2.1.45 99 7/7/2024
2.1.44 93 7/7/2024
2.1.43 339 7/7/2024
2.1.42 96 7/7/2024
2.1.41 95 7/7/2024
2.1.40 153 7/7/2024
2.1.39 192 7/7/2024
2.1.38 105 7/7/2024
2.1.37 365 7/7/2024
2.1.36 215 7/7/2024
2.1.35 380 7/5/2024
2.1.34 472 7/3/2024
2.1.33 204 7/3/2024
2.1.32 190 7/3/2024
2.1.31 193 7/3/2024
2.1.30 178 7/3/2024
2.1.29 221 7/3/2024
2.1.28 102 7/3/2024
2.1.27 100 7/3/2024
2.1.26 99 7/3/2024
2.1.25 210 7/3/2024
2.1.24 175 7/3/2024
2.1.23 104 7/3/2024
2.1.22 370 7/3/2024
2.1.21 101 7/3/2024
2.1.20 373 7/3/2024
2.1.19 105 7/3/2024
2.1.18 421 7/2/2024
2.1.17 287 6/30/2024
2.1.16 227 6/30/2024
2.1.15 118 6/30/2024
2.1.14 112 6/30/2024
2.1.13 95 6/30/2024
2.1.12 249 6/30/2024
2.1.11 375 6/28/2024
2.1.10 109 6/28/2024
2.1.9 202 6/28/2024
2.1.8 132 6/28/2024
2.1.7 202 6/27/2024
2.1.6 152 6/27/2024
2.1.5 102 6/27/2024
2.1.4 452 6/27/2024
2.1.3 494 6/23/2024
2.1.2 106 6/23/2024
2.1.1 114 6/23/2024