Soenneker.Blazor.Utils.ModuleImport 2.1.170

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.170                
NuGet\Install-Package Soenneker.Blazor.Utils.ModuleImport -Version 2.1.170                
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.170" />                
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.170                
#r "nuget: Soenneker.Blazor.Utils.ModuleImport, 2.1.170"                
#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.170

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

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.564 163 11/6/2024
2.1.563 32 11/6/2024
2.1.562 591 11/1/2024
2.1.561 286 11/1/2024
2.1.560 59 11/1/2024
2.1.559 248 11/1/2024
2.1.558 60 11/1/2024
2.1.557 64 11/1/2024
2.1.556 60 11/1/2024
2.1.555 380 11/1/2024
2.1.554 764 10/29/2024
2.1.553 155 10/29/2024
2.1.552 62 10/29/2024
2.1.551 162 10/29/2024
2.1.550 61 10/29/2024
2.1.549 477 10/29/2024
2.1.547 262 10/29/2024
2.1.546 65 10/29/2024
2.1.545 67 10/29/2024
2.1.544 382 10/29/2024
2.1.543 63 10/29/2024
2.1.542 66 10/29/2024
2.1.541 242 10/29/2024
2.1.540 632 10/29/2024
2.1.539 66 10/29/2024
2.1.538 492 10/29/2024
2.1.537 62 10/28/2024
2.1.536 65 10/28/2024
2.1.535 525 10/28/2024
2.1.534 710 10/26/2024
2.1.533 148 10/26/2024
2.1.532 65 10/26/2024
2.1.531 193 10/26/2024
2.1.530 70 10/26/2024
2.1.529 936 10/22/2024
2.1.528 248 10/22/2024
2.1.527 58 10/22/2024
2.1.526 71 10/22/2024
2.1.525 290 10/22/2024
2.1.524 65 10/22/2024
2.1.523 502 10/22/2024
2.1.522 67 10/22/2024
2.1.521 64 10/22/2024
2.1.520 401 10/22/2024
2.1.519 1,362 10/18/2024
2.1.518 104 10/18/2024
2.1.517 97 10/18/2024
2.1.516 402 10/17/2024
2.1.515 65 10/17/2024
2.1.514 327 10/17/2024
2.1.513 72 10/17/2024
2.1.512 1,004 10/15/2024
2.1.511 75 10/15/2024
2.1.510 72 10/15/2024
2.1.509 483 10/15/2024
2.1.508 63 10/15/2024
2.1.507 80 10/14/2024
2.1.506 73 10/14/2024
2.1.505 1,003 10/12/2024
2.1.504 174 10/12/2024
2.1.503 72 10/12/2024
2.1.502 210 10/12/2024
2.1.501 79 10/12/2024
2.1.500 294 10/12/2024
2.1.499 387 10/11/2024
2.1.498 70 10/11/2024
2.1.497 74 10/11/2024
2.1.496 363 10/11/2024
2.1.495 74 10/11/2024
2.1.494 687 10/9/2024
2.1.493 180 10/9/2024
2.1.492 177 10/9/2024
2.1.491 69 10/9/2024
2.1.490 392 10/9/2024
2.1.489 312 10/9/2024
2.1.488 73 10/9/2024
2.1.487 72 10/9/2024
2.1.486 164 10/9/2024
2.1.485 69 10/9/2024
2.1.484 189 10/8/2024
2.1.483 69 10/8/2024
2.1.482 74 10/8/2024
2.1.481 68 10/8/2024
2.1.480 547 10/8/2024
2.1.479 504 10/8/2024
2.1.478 76 10/8/2024
2.1.477 228 10/8/2024
2.1.476 72 10/8/2024
2.1.475 394 10/8/2024
2.1.474 76 10/8/2024
2.1.473 286 10/8/2024
2.1.472 73 10/8/2024
2.1.471 1,014 10/3/2024
2.1.470 158 10/3/2024
2.1.469 284 10/3/2024
2.1.468 66 10/3/2024
2.1.467 65 10/3/2024
2.1.466 57 10/3/2024
2.1.465 459 10/3/2024
2.1.464 68 10/3/2024
2.1.463 65 10/3/2024
2.1.462 184 10/3/2024
2.1.461 68 10/3/2024
2.1.460 179 10/3/2024
2.1.459 66 10/3/2024
2.1.458 886 10/2/2024
2.1.457 100 10/2/2024
2.1.456 181 10/2/2024
2.1.455 174 10/2/2024
2.1.454 69 10/2/2024
2.1.453 356 10/2/2024
2.1.452 64 10/2/2024
2.1.451 68 10/2/2024
2.1.450 321 10/2/2024
2.1.449 510 10/2/2024
2.1.448 255 10/1/2024
2.1.447 69 10/1/2024
2.1.446 68 10/1/2024
2.1.445 398 10/1/2024
2.1.444 68 10/1/2024
2.1.443 201 10/1/2024
2.1.442 402 10/1/2024
2.1.441 70 10/1/2024
2.1.440 67 10/1/2024
2.1.439 390 10/1/2024
2.1.438 71 10/1/2024
2.1.437 435 9/29/2024
2.1.436 214 9/29/2024
2.1.435 68 9/29/2024
2.1.434 307 9/29/2024
2.1.433 76 9/29/2024
2.1.432 237 9/29/2024
2.1.431 71 9/29/2024
2.1.430 226 9/29/2024
2.1.429 76 9/29/2024
2.1.428 76 9/29/2024
2.1.427 366 9/29/2024
2.1.426 519 9/27/2024
2.1.425 213 9/27/2024
2.1.424 73 9/27/2024
2.1.423 232 9/27/2024
2.1.422 72 9/27/2024
2.1.421 194 9/27/2024
2.1.420 340 9/27/2024
2.1.419 227 9/27/2024
2.1.418 81 9/27/2024
2.1.417 457 9/27/2024
2.1.416 80 9/27/2024
2.1.415 73 9/27/2024
2.1.414 282 9/27/2024
2.1.413 77 9/27/2024
2.1.412 513 9/27/2024
2.1.411 170 9/27/2024
2.1.410 70 9/27/2024
2.1.409 199 9/26/2024
2.1.408 70 9/26/2024
2.1.407 267 9/26/2024
2.1.406 73 9/26/2024
2.1.405 237 9/26/2024
2.1.404 344 9/26/2024
2.1.403 153 9/26/2024
2.1.402 75 9/26/2024
2.1.401 73 9/26/2024
2.1.400 191 9/26/2024
2.1.399 73 9/26/2024
2.1.398 76 9/26/2024
2.1.397 444 9/26/2024
2.1.395 255 9/26/2024
2.1.394 349 9/26/2024
2.1.393 79 9/26/2024
2.1.392 175 9/26/2024
2.1.391 72 9/26/2024
2.1.390 785 9/23/2024
2.1.389 180 9/23/2024
2.1.388 106 9/23/2024
2.1.387 185 9/23/2024
2.1.386 76 9/23/2024
2.1.385 215 9/23/2024
2.1.384 271 9/23/2024
2.1.383 81 9/23/2024
2.1.382 202 9/23/2024
2.1.381 79 9/23/2024
2.1.380 178 9/23/2024
2.1.379 74 9/23/2024
2.1.378 82 9/23/2024
2.1.377 74 9/23/2024
2.1.376 457 9/23/2024
2.1.375 75 9/23/2024
2.1.374 468 9/23/2024
2.1.373 240 9/23/2024
2.1.372 76 9/23/2024
2.1.371 504 9/23/2024
2.1.370 74 9/23/2024
2.1.369 123 9/23/2024
2.1.368 68 9/23/2024
2.1.367 337 9/23/2024
2.1.366 75 9/23/2024
2.1.365 231 9/23/2024
2.1.364 159 9/23/2024
2.1.363 74 9/22/2024
2.1.362 766 9/18/2024
2.1.361 84 9/18/2024
2.1.360 78 9/18/2024
2.1.359 193 9/18/2024
2.1.358 77 9/18/2024
2.1.357 172 9/18/2024
2.1.356 72 9/18/2024
2.1.355 85 9/18/2024
2.1.354 73 9/18/2024
2.1.353 81 9/18/2024
2.1.352 558 9/18/2024
2.1.351 79 9/18/2024
2.1.350 240 9/17/2024
2.1.349 82 9/17/2024
2.1.348 143 9/17/2024
2.1.347 111 9/17/2024
2.1.346 187 9/17/2024
2.1.345 84 9/17/2024
2.1.344 226 9/17/2024
2.1.343 88 9/17/2024
2.1.342 86 9/17/2024
2.1.341 249 9/17/2024
2.1.340 76 9/17/2024
2.1.339 94 9/17/2024
2.1.338 249 9/17/2024
2.1.337 71 9/17/2024
2.1.336 269 9/17/2024
2.1.335 244 9/17/2024
2.1.334 68 9/17/2024
2.1.333 81 9/17/2024
2.1.332 268 9/17/2024
2.1.331 147 9/17/2024
2.1.330 186 9/17/2024
2.1.329 90 9/17/2024
2.1.328 83 9/17/2024
2.1.327 795 9/16/2024
2.1.326 273 9/16/2024
2.1.325 92 9/16/2024
2.1.324 90 9/16/2024
2.1.323 290 9/16/2024
2.1.321 971 9/12/2024
2.1.320 89 9/12/2024
2.1.319 230 9/12/2024
2.1.318 94 9/12/2024
2.1.317 79 9/12/2024
2.1.316 88 9/12/2024
2.1.315 265 9/12/2024
2.1.314 351 9/12/2024
2.1.313 98 9/12/2024
2.1.312 253 9/12/2024
2.1.311 105 9/12/2024
2.1.310 242 9/12/2024
2.1.309 96 9/12/2024
2.1.308 276 9/11/2024
2.1.307 98 9/11/2024
2.1.306 253 9/11/2024
2.1.305 99 9/11/2024
2.1.304 224 9/11/2024
2.1.303 103 9/11/2024
2.1.302 84 9/11/2024
2.1.301 444 9/11/2024
2.1.300 82 9/11/2024
2.1.299 82 9/11/2024
2.1.298 356 9/11/2024
2.1.297 101 9/11/2024
2.1.296 103 9/11/2024
2.1.295 101 9/11/2024
2.1.294 86 9/11/2024
2.1.293 626 9/11/2024
2.1.292 97 9/11/2024
2.1.291 660 9/10/2024
2.1.290 105 9/10/2024
2.1.289 189 9/10/2024
2.1.287 604 9/10/2024
2.1.286 100 9/10/2024
2.1.285 99 9/10/2024
2.1.284 99 9/10/2024
2.1.283 266 9/10/2024
2.1.282 94 9/10/2024
2.1.281 94 9/10/2024
2.1.280 554 9/10/2024
2.1.277 328 9/10/2024
2.1.276 88 9/9/2024
2.1.275 169 9/9/2024
2.1.274 89 9/9/2024
2.1.273 351 9/9/2024
2.1.272 90 9/9/2024
2.1.271 94 9/9/2024
2.1.270 100 9/9/2024
2.1.269 86 9/9/2024
2.1.267 93 9/9/2024
2.1.266 90 9/9/2024
2.1.265 945 9/9/2024
2.1.264 90 9/9/2024
2.1.263 271 9/9/2024
2.1.262 686 9/7/2024
2.1.261 88 9/7/2024
2.1.260 303 9/7/2024
2.1.259 96 9/7/2024
2.1.258 334 9/7/2024
2.1.257 86 9/7/2024
2.1.256 99 9/6/2024
2.1.255 368 9/6/2024
2.1.254 188 9/6/2024
2.1.253 86 9/6/2024
2.1.252 282 9/6/2024
2.1.251 353 9/6/2024
2.1.250 90 9/6/2024
2.1.249 238 9/6/2024
2.1.248 89 9/6/2024
2.1.247 88 9/5/2024
2.1.246 76 9/5/2024
2.1.245 424 9/5/2024
2.1.244 209 9/5/2024
2.1.243 95 9/5/2024
2.1.242 333 9/5/2024
2.1.241 77 9/5/2024
2.1.240 211 9/5/2024
2.1.239 92 9/5/2024
2.1.238 95 9/5/2024
2.1.237 101 9/5/2024
2.1.236 85 9/5/2024
2.1.235 664 9/5/2024
2.1.234 198 9/5/2024
2.1.233 95 9/5/2024
2.1.232 104 9/4/2024
2.1.231 82 9/4/2024
2.1.230 698 9/4/2024
2.1.229 344 9/4/2024
2.1.228 218 9/4/2024
2.1.227 206 9/4/2024
2.1.226 206 9/3/2024
2.1.225 94 9/3/2024
2.1.224 88 9/3/2024
2.1.223 107 9/3/2024
2.1.222 304 9/3/2024
2.1.221 289 9/3/2024
2.1.220 88 9/3/2024
2.1.219 96 9/3/2024
2.1.218 80 9/3/2024
2.1.217 321 9/3/2024
2.1.216 109 9/3/2024
2.1.215 75 9/3/2024
2.1.214 880 8/29/2024
2.1.213 81 8/29/2024
2.1.212 66 8/29/2024
2.1.211 192 8/29/2024
2.1.210 77 8/29/2024
2.1.209 87 8/29/2024
2.1.208 82 8/29/2024
2.1.207 703 8/26/2024
2.1.206 194 8/26/2024
2.1.205 95 8/26/2024
2.1.204 206 8/26/2024
2.1.203 94 8/26/2024
2.1.202 90 8/26/2024
2.1.201 521 8/26/2024
2.1.200 412 8/21/2024
2.1.199 118 8/21/2024
2.1.198 225 8/21/2024
2.1.197 302 8/21/2024
2.1.196 105 8/21/2024
2.1.195 96 8/21/2024
2.1.194 96 8/21/2024
2.1.193 355 8/21/2024
2.1.192 123 8/21/2024
2.1.191 284 8/21/2024
2.1.190 95 8/21/2024
2.1.189 117 8/20/2024
2.1.188 100 8/20/2024
2.1.187 353 8/20/2024
2.1.186 372 8/20/2024
2.1.185 116 8/20/2024
2.1.184 98 8/20/2024
2.1.183 375 8/20/2024
2.1.182 103 8/20/2024
2.1.181 112 8/20/2024
2.1.180 112 8/20/2024
2.1.179 109 8/20/2024
2.1.178 108 8/20/2024
2.1.177 752 8/19/2024
2.1.176 424 8/15/2024
2.1.175 178 8/15/2024
2.1.174 200 8/15/2024
2.1.173 207 8/15/2024
2.1.172 179 8/15/2024
2.1.171 102 8/15/2024
2.1.170 273 8/15/2024
2.1.169 105 8/15/2024
2.1.168 651 8/14/2024
2.1.167 277 8/14/2024
2.1.166 100 8/14/2024
2.1.165 104 8/14/2024
2.1.164 102 8/14/2024
2.1.163 251 8/13/2024
2.1.162 496 8/13/2024
2.1.161 441 8/7/2024
2.1.160 90 8/7/2024
2.1.159 236 8/7/2024
2.1.158 180 8/7/2024
2.1.157 85 8/7/2024
2.1.156 89 8/7/2024
2.1.155 92 8/7/2024
2.1.154 228 8/6/2024
2.1.153 96 8/6/2024
2.1.152 208 8/6/2024
2.1.151 78 8/6/2024
2.1.150 660 8/1/2024
2.1.149 234 8/1/2024
2.1.148 80 8/1/2024
2.1.147 205 8/1/2024
2.1.146 163 8/1/2024
2.1.145 92 8/1/2024
2.1.144 294 8/1/2024
2.1.143 80 8/1/2024
2.1.142 123 8/1/2024
2.1.141 77 8/1/2024
2.1.140 605 7/25/2024
2.1.139 211 7/25/2024
2.1.138 107 7/25/2024
2.1.137 134 7/25/2024
2.1.136 151 7/25/2024
2.1.135 153 7/25/2024
2.1.134 127 7/25/2024
2.1.133 187 7/25/2024
2.1.132 83 7/25/2024
2.1.131 236 7/25/2024
2.1.130 51 7/25/2024
2.1.129 137 7/24/2024
2.1.128 68 7/24/2024
2.1.127 55 7/24/2024
2.1.126 134 7/24/2024
2.1.125 42 7/24/2024
2.1.124 996 7/20/2024
2.1.123 130 7/20/2024
2.1.122 128 7/20/2024
2.1.121 91 7/20/2024
2.1.120 135 7/20/2024
2.1.119 95 7/20/2024
2.1.118 173 7/20/2024
2.1.117 82 7/20/2024
2.1.116 627 7/17/2024
2.1.115 159 7/17/2024
2.1.114 345 7/14/2024
2.1.113 86 7/14/2024
2.1.112 240 7/14/2024
2.1.111 92 7/14/2024
2.1.110 93 7/14/2024
2.1.109 260 7/14/2024
2.1.108 87 7/14/2024
2.1.107 88 7/14/2024
2.1.106 90 7/14/2024
2.1.105 314 7/14/2024
2.1.104 85 7/14/2024
2.1.103 538 7/10/2024
2.1.102 87 7/10/2024
2.1.101 76 7/10/2024
2.1.100 95 7/10/2024
2.1.99 74 7/10/2024
2.1.98 80 7/10/2024
2.1.97 92 7/10/2024
2.1.96 91 7/10/2024
2.1.95 75 7/10/2024
2.1.94 82 7/10/2024
2.1.93 669 7/10/2024
2.1.92 85 7/10/2024
2.1.91 195 7/10/2024
2.1.90 86 7/10/2024
2.1.89 83 7/10/2024
2.1.88 149 7/10/2024
2.1.87 82 7/10/2024
2.1.86 143 7/10/2024
2.1.85 84 7/10/2024
2.1.84 190 7/10/2024
2.1.83 79 7/10/2024
2.1.82 162 7/10/2024
2.1.81 94 7/10/2024
2.1.79 156 7/10/2024
2.1.78 158 7/10/2024
2.1.77 94 7/10/2024
2.1.76 179 7/9/2024
2.1.73 152 7/9/2024
2.1.72 76 7/9/2024
2.1.71 94 7/9/2024
2.1.70 923 7/9/2024
2.1.69 80 7/9/2024
2.1.68 76 7/9/2024
2.1.67 74 7/9/2024
2.1.66 2,551 7/9/2024
2.1.65 90 7/9/2024
2.1.64 372 7/9/2024
2.1.63 85 7/9/2024
2.1.62 89 7/9/2024
2.1.61 93 7/9/2024
2.1.60 437 7/9/2024
2.1.59 95 7/9/2024
2.1.57 82 7/8/2024
2.1.56 104 7/8/2024
2.1.55 98 7/8/2024
2.1.54 465 7/8/2024
2.1.53 87 7/8/2024
2.1.52 218 7/8/2024
2.1.51 100 7/8/2024
2.1.50 445 7/8/2024
2.1.49 134 7/8/2024
2.1.48 201 7/8/2024
2.1.47 90 7/8/2024
2.1.46 348 7/8/2024
2.1.45 102 7/7/2024
2.1.44 96 7/7/2024
2.1.43 348 7/7/2024
2.1.42 99 7/7/2024
2.1.41 98 7/7/2024
2.1.40 156 7/7/2024
2.1.39 195 7/7/2024
2.1.38 108 7/7/2024
2.1.37 368 7/7/2024
2.1.36 218 7/7/2024
2.1.35 383 7/5/2024
2.1.34 476 7/3/2024
2.1.33 207 7/3/2024
2.1.32 192 7/3/2024
2.1.31 195 7/3/2024
2.1.30 180 7/3/2024
2.1.29 223 7/3/2024
2.1.28 104 7/3/2024
2.1.27 102 7/3/2024
2.1.26 101 7/3/2024
2.1.25 212 7/3/2024
2.1.24 177 7/3/2024
2.1.23 106 7/3/2024
2.1.22 372 7/3/2024
2.1.21 104 7/3/2024
2.1.20 376 7/3/2024
2.1.19 108 7/3/2024
2.1.18 424 7/2/2024
2.1.17 290 6/30/2024
2.1.16 232 6/30/2024
2.1.15 124 6/30/2024
2.1.14 114 6/30/2024
2.1.13 99 6/30/2024
2.1.12 251 6/30/2024
2.1.11 377 6/28/2024
2.1.10 111 6/28/2024
2.1.9 204 6/28/2024
2.1.8 134 6/28/2024
2.1.7 204 6/27/2024
2.1.6 156 6/27/2024
2.1.5 104 6/27/2024
2.1.4 454 6/27/2024
2.1.3 496 6/23/2024
2.1.2 108 6/23/2024
2.1.1 116 6/23/2024