Blazor.DOM.WebAssembly 10.1.0

dotnet add package Blazor.DOM.WebAssembly --version 10.1.0
                    
NuGet\Install-Package Blazor.DOM.WebAssembly -Version 10.1.0
                    
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="Blazor.DOM.WebAssembly" Version="10.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Blazor.DOM.WebAssembly" Version="10.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Blazor.DOM.WebAssembly" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Blazor.DOM.WebAssembly --version 10.1.0
                    
#r "nuget: Blazor.DOM.WebAssembly, 10.1.0"
                    
#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.
#:package Blazor.DOM.WebAssembly@10.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Blazor.DOM.WebAssembly&version=10.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Blazor.DOM.WebAssembly&version=10.1.0
                    
Install as a Cake Tool

Blazor.DOM.WebAssembly

JavaScript reference proxy runtime for exhaustive Blazor DOM bindings — WebAssembly flavour with synchronous dispatch paths.

Overview

Blazor.DOM.WebAssembly is the mutually exclusive in-process package for Blazor WebAssembly. It contains the shared value/runtime corpus directly rather than depending on Blazor.DOM. Non-Promise DOM operations are synchronous; Promise and lifecycle operations remain cancellable and asynchronous.

Key services

Service Description
IBrowser Entry point for common browser globals.
IDomRuntime Async validated JSON, typed reference/callback, and bounded stream dispatch.
IDomSyncRuntime Sync validated JSON/reference dispatch for non-Promise DOM ops.
IDomProxyFactory Typed proxy registry.

Getting started

// Program.cs
builder.Services.AddBlazorDOMWebAssembly();
@inject IBrowser Browser
@inject IDomSyncRuntime SyncRuntime

@code {
    protected override async Task OnAfterRenderAsync(bool firstRender)
    {
        if (!firstRender) return;
        // First call initialises the module asynchronously:
        var docRef = await Browser.GetDocumentAsync() as IJSInProcessObjectReference;
        // After this, sync calls work:
        // var title = SyncRuntime.GetProperty<string>(docRef!, "title");
    }
}

Notes

  • Do not reference this package together with Blazor.DOM; both intentionally provide the same generated namespaces with different host signatures.
  • Call at least one async DOM method before using synchronous dispatch to ensure the JS module is loaded.
  • WasmDomProxyBase extends DomProxyBase with SyncRuntime and InProcessReference accessors.
  • Transport classification and ownership match Blazor.DOM: interfaces use explicit synchronous/asynchronous live-reference paths, nullable interface results use the typed async reference-result APIs, callback references are borrowed unless promoted, and Blob/ArrayBuffer/typed-array bytes use bounded IJSStreamReference reads with cancellation and async disposal. Empty values use an owned zero-length stream without an invalid JS stream reference.
  • The legacy JSON event snapshot remains available, while generated event contracts should use AddReferenceEventListenerAsync<TProxy>.
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.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.1.0 115 7/24/2026