WebView2.DevTools.Dom
WebView2.DevTools.Dom - Extension WebView2 providing strongly typed DOM access/modification. ✔️ WebView2.DevTools.Dom is a library for strongly typed DOM access when using WebView2. ✔️ It provides a convenient way to write readable/robust/refactorable DOM access code. ✔️ Chrome DevTools Protocol based API ✔️ Talks directly to the WebView2 browser (no remote debugging port required). ✔️ Extensive Unit Tests ✔️ Free for everyone to use // Add using WebView2.DevTools.Dom; to get access to the CreateDevToolsContextAsync extension method var devToolsContext = await coreWebView2.CreateDevToolsContextAsync(); // Get element by Id // https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector var htmlDivElement = await devToolsContext.QuerySelectorAsync<HtmlDivElement>("#myDivElementId"); //Set innerText property for the element await htmlDivElement.SetInnerTextAsync("Welcome!"); // Manually dispose of context (only DisposeAsync is supported as the whole API is async) // alternativly use await using var devToolsContext = await coreWebView2.CreateDevToolsContextAsync(); // if your .Net version supports it. await devToolsContext.DisposeAsync(); Website: https://github.com/ChromiumDotNet/WebView2.DevTools.Dom
Install
dotnet add package WebView2.DevTools.Dom --version 3.0.0-beta01
Install-Package WebView2.DevTools.Dom -Version 3.0.0-beta01
<PackageReference Include="WebView2.DevTools.Dom" Version="3.0.0-beta01" />
Frameworks
Dependencies
Adoption guide
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
This version is marked prerelease. Validate its API and upgrade path before production use.
No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.
Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.
How to read this guidance
Sources: published NuGet v3 registry metadata and explicit NuBrowse editorial guides. Refresh: package metadata is refreshed from NuGet when the page loads. Limit: this is not a security, legal or compatibility guarantee; validate the selected version in your project.
Useful next steps
Move from package metadata to a concrete selection or review workflow.