-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Closed
Copy link
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components
Milestone
Description
Background and Motivation
We currently have an experimental support package Microsoft.AspNetCore.Components.CustomElements that enables rendering Blazor components using custom HTML elements. This makes it easier to utilize Blazor in projects built on other web frameworks. Since this is a scenario we strongly care about, we'd like to productize this feature as an officially supported package (see #38447).
Proposed API
namespace Microsoft.AspNetCore.Components.Web;
+ public static class CustomElementsJSComponentConfigurationExtensions
{
+ public void RegisterAsCustomElement<TComponent>(this IJSComponentConfiguration configuration, string customElementName) where TComponent : IComponent;
}
Usage Example
var builder = WebAssemblyHostBuilder.CreateDefault(args);
// ...
builder.RootComponents.RegisterAsCustomElement<MyComponent>("my-custom-element");
Metadata
Metadata
Assignees
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components