You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ElementInternalsType/explainer.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,11 +22,12 @@ Currently, web developers face challenges when trying to implement these behavio
22
22
This proposal addresses these challenges by introducing a standardized way for custom elements to opt into specific button activation behaviors through a simple static property declaration. By building on the established pattern of [form-associated custom elements](https://html.spec.whatwg.org/dev/custom-elements.html#form-associated-custom-elements), this approach provides a familiar developer experience while ensuring cross-browser compatibility and proper integration with platform features like the [Invoker Commands API](https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API).
23
23
24
24
### Goals
25
-
- A solution to support key button activation use cases, particularly command invocation and form submission
25
+
- A solution to support key button activation use cases, particularly command invocation.
26
26
27
27
### Non-goals
28
28
- Providing an alternative to the customized built-in solution (`extends` and `is`), i.e., enabling a custom element to do everything a native button does.
29
29
- A declarative version of this proposal. This requires finding a general solution for declarative custom elements, which should be explored separately.
30
+
- Providing guidance on how to indicate that new behavior has been added to an element, which is discussed [here](https://github.com/WICG/webcomponents/issues/1029).
We propose enabling web component authors to create custom elements with button activation behaviors by adding a static `buttonActivationBehaviors` property to their custom element class definition.
0 commit comments