-
Notifications
You must be signed in to change notification settings - Fork 10.6k
DOM API Bindings and Blazor support #28820
Copy link
Copy link
Closed as not planned
Labels
affected-fewThis issue impacts only small number of customersThis issue impacts only small number of customersarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-jsinteropThis issue is related to JSInterop in BlazorThis issue is related to JSInterop in Blazornot-on-roadmapseverity-majorThis label is used by an internal toolThis label is used by an internal tool
Milestone
Metadata
Metadata
Assignees
Labels
affected-fewThis issue impacts only small number of customersThis issue impacts only small number of customersarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-jsinteropThis issue is related to JSInterop in BlazorThis issue is related to JSInterop in Blazornot-on-roadmapseverity-majorThis label is used by an internal toolThis label is used by an internal tool
Type
Fields
Give feedbackNo fields configured for Feature.
This probably falls under runtime but I think it is relevant to the Web framework.
There is a project in the Mono repository for generating bindings to the DOM API through JavaScript interop.
The plan/idea is to generate the C# code bindings from TypeScript. But it seems like the effort is on hold.
See: mono/mono#10775
However: I see an opportunity in combining that effort with Blazor, enabling developers to use these classes directly from Razor. (Just for Blazor Web, of course)
Instead of an
ElementReferenceyou could cast a random HTML element into its corresponding class to perform stuff you otherwise would need manually write JavaScript (if there is not a third-party library for that)We need this functionality in order to build powerful web apps with just C#.
I have not thought about the server-side scenario, but I guess that you could trigger JavaScript in the browser similar to today.