Soenneker.Blazor.Utils.ModuleImport 2.1.330

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

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

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.471 114 10/3/2024
2.1.470 66 10/3/2024
2.1.469 112 10/3/2024
2.1.468 29 10/3/2024
2.1.467 22 10/3/2024
2.1.466 17 10/3/2024
2.1.465 159 10/3/2024
2.1.464 31 10/3/2024
2.1.463 28 10/3/2024
2.1.462 68 10/3/2024
2.1.461 30 10/3/2024
2.1.460 76 10/3/2024
2.1.459 29 10/3/2024
2.1.458 354 10/2/2024
2.1.457 43 10/2/2024
2.1.456 87 10/2/2024
2.1.455 75 10/2/2024
2.1.454 33 10/2/2024
2.1.453 153 10/2/2024
2.1.452 28 10/2/2024
2.1.451 32 10/2/2024
2.1.450 170 10/2/2024
2.1.449 246 10/2/2024
2.1.448 137 10/1/2024
2.1.447 33 10/1/2024
2.1.446 32 10/1/2024
2.1.445 270 10/1/2024
2.1.444 33 10/1/2024
2.1.443 134 10/1/2024
2.1.442 286 10/1/2024
2.1.441 33 10/1/2024
2.1.440 30 10/1/2024
2.1.439 295 10/1/2024
2.1.438 34 10/1/2024
2.1.437 399 9/29/2024
2.1.436 205 9/29/2024
2.1.435 59 9/29/2024
2.1.434 298 9/29/2024
2.1.433 67 9/29/2024
2.1.432 211 9/29/2024
2.1.431 61 9/29/2024
2.1.430 211 9/29/2024
2.1.429 66 9/29/2024
2.1.428 66 9/29/2024
2.1.427 355 9/29/2024
2.1.426 509 9/27/2024
2.1.425 198 9/27/2024
2.1.424 63 9/27/2024
2.1.423 222 9/27/2024
2.1.422 62 9/27/2024
2.1.421 179 9/27/2024
2.1.420 330 9/27/2024
2.1.419 217 9/27/2024
2.1.418 71 9/27/2024
2.1.417 447 9/27/2024
2.1.416 70 9/27/2024
2.1.415 63 9/27/2024
2.1.414 261 9/27/2024
2.1.413 67 9/27/2024
2.1.412 498 9/27/2024
2.1.411 161 9/27/2024
2.1.410 61 9/27/2024
2.1.409 188 9/26/2024
2.1.408 61 9/26/2024
2.1.407 252 9/26/2024
2.1.406 64 9/26/2024
2.1.405 227 9/26/2024
2.1.404 334 9/26/2024
2.1.403 145 9/26/2024
2.1.402 67 9/26/2024
2.1.401 63 9/26/2024
2.1.400 181 9/26/2024
2.1.399 63 9/26/2024
2.1.398 66 9/26/2024
2.1.397 434 9/26/2024
2.1.395 244 9/26/2024
2.1.394 339 9/26/2024
2.1.393 69 9/26/2024
2.1.392 165 9/26/2024
2.1.391 62 9/26/2024
2.1.390 702 9/23/2024
2.1.389 170 9/23/2024
2.1.388 96 9/23/2024
2.1.387 175 9/23/2024
2.1.386 66 9/23/2024
2.1.385 200 9/23/2024
2.1.384 261 9/23/2024
2.1.383 71 9/23/2024
2.1.382 192 9/23/2024
2.1.381 69 9/23/2024
2.1.380 168 9/23/2024
2.1.379 65 9/23/2024
2.1.378 73 9/23/2024
2.1.377 65 9/23/2024
2.1.376 448 9/23/2024
2.1.375 66 9/23/2024
2.1.374 454 9/23/2024
2.1.373 230 9/23/2024
2.1.372 66 9/23/2024
2.1.371 489 9/23/2024
2.1.370 64 9/23/2024
2.1.369 113 9/23/2024
2.1.368 57 9/23/2024
2.1.367 327 9/23/2024
2.1.366 65 9/23/2024
2.1.365 220 9/23/2024
2.1.364 149 9/23/2024
2.1.363 64 9/22/2024
2.1.362 624 9/18/2024
2.1.361 77 9/18/2024
2.1.360 71 9/18/2024
2.1.359 186 9/18/2024
2.1.358 69 9/18/2024
2.1.357 164 9/18/2024
2.1.356 63 9/18/2024
2.1.355 73 9/18/2024
2.1.354 61 9/18/2024
2.1.353 69 9/18/2024
2.1.352 546 9/18/2024
2.1.351 67 9/18/2024
2.1.350 231 9/17/2024
2.1.349 70 9/17/2024
2.1.348 131 9/17/2024
2.1.347 98 9/17/2024
2.1.346 174 9/17/2024
2.1.345 71 9/17/2024
2.1.344 213 9/17/2024
2.1.343 74 9/17/2024
2.1.342 72 9/17/2024
2.1.341 236 9/17/2024
2.1.340 63 9/17/2024
2.1.339 82 9/17/2024
2.1.338 238 9/17/2024
2.1.337 60 9/17/2024
2.1.336 257 9/17/2024
2.1.335 232 9/17/2024
2.1.334 56 9/17/2024
2.1.333 69 9/17/2024
2.1.332 256 9/17/2024
2.1.331 139 9/17/2024
2.1.330 174 9/17/2024
2.1.329 78 9/17/2024
2.1.328 71 9/17/2024
2.1.327 783 9/16/2024
2.1.326 260 9/16/2024
2.1.325 80 9/16/2024
2.1.324 78 9/16/2024
2.1.323 278 9/16/2024
2.1.321 871 9/12/2024
2.1.320 81 9/12/2024
2.1.319 222 9/12/2024
2.1.318 86 9/12/2024
2.1.317 71 9/12/2024
2.1.316 80 9/12/2024
2.1.315 258 9/12/2024
2.1.314 344 9/12/2024
2.1.313 91 9/12/2024
2.1.312 246 9/12/2024
2.1.311 98 9/12/2024
2.1.310 235 9/12/2024
2.1.309 89 9/12/2024
2.1.308 269 9/11/2024
2.1.307 91 9/11/2024
2.1.306 246 9/11/2024
2.1.305 92 9/11/2024
2.1.304 216 9/11/2024
2.1.303 95 9/11/2024
2.1.302 76 9/11/2024
2.1.301 435 9/11/2024
2.1.300 74 9/11/2024
2.1.299 73 9/11/2024
2.1.298 347 9/11/2024
2.1.297 92 9/11/2024
2.1.296 94 9/11/2024
2.1.295 93 9/11/2024
2.1.294 77 9/11/2024
2.1.293 618 9/11/2024
2.1.292 89 9/11/2024
2.1.291 652 9/10/2024
2.1.290 97 9/10/2024
2.1.289 181 9/10/2024
2.1.287 594 9/10/2024
2.1.286 92 9/10/2024
2.1.285 90 9/10/2024
2.1.284 90 9/10/2024
2.1.283 256 9/10/2024
2.1.282 85 9/10/2024
2.1.281 85 9/10/2024
2.1.280 545 9/10/2024
2.1.277 319 9/10/2024
2.1.276 78 9/9/2024
2.1.275 160 9/9/2024
2.1.274 80 9/9/2024
2.1.273 342 9/9/2024
2.1.272 81 9/9/2024
2.1.271 85 9/9/2024
2.1.270 91 9/9/2024
2.1.269 77 9/9/2024
2.1.267 83 9/9/2024
2.1.266 81 9/9/2024
2.1.265 931 9/9/2024
2.1.264 81 9/9/2024
2.1.263 262 9/9/2024
2.1.262 677 9/7/2024
2.1.261 79 9/7/2024
2.1.260 293 9/7/2024
2.1.259 84 9/7/2024
2.1.258 324 9/7/2024
2.1.257 77 9/7/2024
2.1.256 90 9/6/2024
2.1.255 360 9/6/2024
2.1.254 179 9/6/2024
2.1.253 77 9/6/2024
2.1.252 273 9/6/2024
2.1.251 345 9/6/2024
2.1.250 82 9/6/2024
2.1.249 230 9/6/2024
2.1.248 81 9/6/2024
2.1.247 80 9/5/2024
2.1.246 68 9/5/2024
2.1.245 416 9/5/2024
2.1.244 201 9/5/2024
2.1.243 86 9/5/2024
2.1.242 324 9/5/2024
2.1.241 68 9/5/2024
2.1.240 202 9/5/2024
2.1.239 83 9/5/2024
2.1.238 86 9/5/2024
2.1.237 92 9/5/2024
2.1.236 76 9/5/2024
2.1.235 649 9/5/2024
2.1.234 189 9/5/2024
2.1.233 86 9/5/2024
2.1.232 95 9/4/2024
2.1.231 73 9/4/2024
2.1.230 690 9/4/2024
2.1.229 336 9/4/2024
2.1.228 209 9/4/2024
2.1.227 196 9/4/2024
2.1.226 197 9/3/2024
2.1.225 85 9/3/2024
2.1.224 80 9/3/2024
2.1.223 99 9/3/2024
2.1.222 296 9/3/2024
2.1.221 282 9/3/2024
2.1.220 81 9/3/2024
2.1.219 89 9/3/2024
2.1.218 73 9/3/2024
2.1.217 313 9/3/2024
2.1.216 102 9/3/2024
2.1.215 68 9/3/2024
2.1.214 876 8/29/2024
2.1.213 77 8/29/2024
2.1.212 62 8/29/2024
2.1.211 188 8/29/2024
2.1.210 73 8/29/2024
2.1.209 83 8/29/2024
2.1.208 78 8/29/2024
2.1.207 698 8/26/2024
2.1.206 191 8/26/2024
2.1.205 92 8/26/2024
2.1.204 203 8/26/2024
2.1.203 90 8/26/2024
2.1.202 86 8/26/2024
2.1.201 517 8/26/2024
2.1.200 409 8/21/2024
2.1.199 115 8/21/2024
2.1.198 222 8/21/2024
2.1.197 296 8/21/2024
2.1.196 98 8/21/2024
2.1.195 93 8/21/2024
2.1.194 93 8/21/2024
2.1.193 351 8/21/2024
2.1.192 116 8/21/2024
2.1.191 281 8/21/2024
2.1.190 92 8/21/2024
2.1.189 112 8/20/2024
2.1.188 97 8/20/2024
2.1.187 345 8/20/2024
2.1.186 369 8/20/2024
2.1.185 113 8/20/2024
2.1.184 95 8/20/2024
2.1.183 367 8/20/2024
2.1.182 100 8/20/2024
2.1.181 109 8/20/2024
2.1.180 109 8/20/2024
2.1.179 106 8/20/2024
2.1.178 105 8/20/2024
2.1.177 749 8/19/2024
2.1.176 419 8/15/2024
2.1.175 175 8/15/2024
2.1.174 197 8/15/2024
2.1.173 204 8/15/2024
2.1.172 176 8/15/2024
2.1.171 99 8/15/2024
2.1.170 270 8/15/2024
2.1.169 102 8/15/2024
2.1.168 648 8/14/2024
2.1.167 274 8/14/2024
2.1.166 97 8/14/2024
2.1.165 101 8/14/2024
2.1.164 99 8/14/2024
2.1.163 247 8/13/2024
2.1.162 492 8/13/2024
2.1.161 407 8/7/2024
2.1.160 86 8/7/2024
2.1.159 232 8/7/2024
2.1.158 176 8/7/2024
2.1.157 81 8/7/2024
2.1.156 85 8/7/2024
2.1.155 88 8/7/2024
2.1.154 224 8/6/2024
2.1.153 93 8/6/2024
2.1.152 204 8/6/2024
2.1.151 74 8/6/2024
2.1.150 657 8/1/2024
2.1.149 230 8/1/2024
2.1.148 76 8/1/2024
2.1.147 201 8/1/2024
2.1.146 161 8/1/2024
2.1.145 90 8/1/2024
2.1.144 291 8/1/2024
2.1.143 77 8/1/2024
2.1.142 121 8/1/2024
2.1.141 74 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 992 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 666 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,562 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 434 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 462 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 344 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 473 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 154 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