/// <summary> /// Allows the specified component type to be used as a custom element. /// </summary> /// <typeparam name="TComponent">The component type.</typeparam> /// <param name="configuration">The <see cref="IJSComponentConfiguration"/>.</param> /// <param name="customElementName">A unique name for the custom element. This must conform to custom element naming rules, so it must contain a dash character.</param> public static void RegisterAsCustomElement <TComponent>(this IJSComponentConfiguration configuration, string customElementName) where TComponent : IComponent => configuration.RegisterForJavaScript <TComponent>(customElementName, "registerBlazorCustomElement");
/// <summary> /// Marks the specified component type as allowed for use as a custom element. /// </summary> /// <typeparam name="TComponent">The component type.</typeparam> /// <param name="configuration">The <see cref="IJSComponentConfiguration"/>.</param> /// <param name="identifier">A unique name for the custom element. This must conform to custom element naming rules, so it must contain a dash character.</param> public static void RegisterCustomElement <[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TComponent>(this IJSComponentConfiguration configuration, string identifier) where TComponent : IComponent => configuration.RegisterForJavaScript <TComponent>(identifier, "registerBlazorCustomElement");