KristofferStrube.Blazor.DOM
0.1.1
Prefix Reserved
See the version list below for details.
dotnet add package KristofferStrube.Blazor.DOM --version 0.1.1
NuGet\Install-Package KristofferStrube.Blazor.DOM -Version 0.1.1
<PackageReference Include="KristofferStrube.Blazor.DOM" Version="0.1.1" />
paket add KristofferStrube.Blazor.DOM --version 0.1.1
#r "nuget: KristofferStrube.Blazor.DOM, 0.1.1"
// Install KristofferStrube.Blazor.DOM as a Cake Addin #addin nuget:?package=KristofferStrube.Blazor.DOM&version=0.1.1 // Install KristofferStrube.Blazor.DOM as a Cake Tool #tool nuget:?package=KristofferStrube.Blazor.DOM&version=0.1.1
Introduction
A Blazor wrapper for the DOM browser API.
The API standardizes a lot of the most basic structures for working within the browser. This includes models for Events, Aborting mechanisms, and Nodes in the DOM. This project implements a wrapper around the API for Blazor so that we can easily and safely interact with it from Blazor.
The project will not focus on the part of the API related to Nodes as this often leads to misuse of Blazor by circumventing the Blazor rendering engine.
Demo
The sample project can be demoed at https://kristofferstrube.github.io/Blazor.DOM/
On each page, you can find the corresponding code for the example in the top right corner.
On the Status page you can see how much of the WebIDL specs this wrapper has covered.
Issues
Feel free to open issues on the repository if you find any errors with the package or have wishes for features.
Related repositories
This project uses the IJSCreatable
interface from the Blazor.WebIDL package to define that Event
s should be able to construct themselves given a JS reference.
Many classes from the Blazor.CSSFontLoading, Blazor.MediaCaptureStreams, and Blazor.WebAudio projects extend the EventTarget
class from this library to be able to dispatch and listen to events.
- https://github.com/KristofferStrube/Blazor.MediaCaptureStreams
- https://github.com/KristofferStrube/Blazor.WebAudio
- https://github.com/KristofferStrube/Blazor.CSSFontLoading
These repositories are going to use the library in the future to support a variety of features.
- https://github.com/KristofferStrube/Blazor.Streams (uses AbortSignals and Events)
- https://github.com/KristofferStrube/Blazor.FileAPI (uses Events)
- https://github.com/KristofferStrube/Blazor.FileSystemAccess (uses Events)
This project is going to be used in the Blazor.UIEvent project but we have not started progress on wrapping the UI Event API yet.
Related articles
This repository was built with inspiration and help from the following series of articles:
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 was computed. 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. |
-
net7.0
- KristofferStrube.Blazor.WebIDL (>= 0.1.0)
- Microsoft.AspNetCore.Components.Web (>= 7.0.3)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on KristofferStrube.Blazor.DOM:
Package | Downloads |
---|---|
KristofferStrube.Blazor.Streams
Streams wrapper implementation for Blazor. |
|
KristofferStrube.Blazor.MediaCaptureStreams
Media Capture and Streams API wrapper implementation for Blazor. |
|
KristofferStrube.Blazor.SVGAnimation
SVG Animation API wrapper implementation for Blazor. |
|
KristofferStrube.Blazor.Window
Window wrapper implementation for Blazor. |
|
KristofferStrube.Blazor.WebWorkers
Web Workers wrapper implementation for Blazor. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.3.0 | 1,835 | 10/23/2024 |
0.2.2 | 1,585 | 4/28/2024 |
0.2.1 | 8,650 | 4/9/2024 |
0.2.0 | 810 | 3/10/2024 |
0.1.1 | 3,491 | 6/21/2023 |
0.1.0 | 92 | 6/21/2023 |
0.1.0-alpha.8 | 92 | 6/20/2023 |
0.1.0-alpha.7 | 92 | 6/20/2023 |
0.1.0-alpha.6 | 82 | 6/20/2023 |
0.1.0-alpha.5 | 169 | 4/10/2023 |
0.1.0-alpha.4 | 110 | 4/10/2023 |
0.1.0-alpha.3 | 91 | 4/10/2023 |
0.1.0-alpha.2 | 148 | 3/1/2023 |
0.1.0-alpha.1 | 115 | 1/18/2023 |
0.1.0-alpha.0 | 106 | 1/16/2023 |