This feature introduces "Platform-Provided Behaviors" to ElementInternals, allowing custom elements to adopt native behaviors without extending native elements or reimplementing complex logic. It modifies attachInternals to accept a list of behaviors, starting with HTMLSubmitButtonBehavior, which wires up form submission on activation.
Custom element authors can't access native behaviors that are built into native HTML elements. This forces them to either: 1. Use customized built-ins (is/extends syntax), which have Shadow DOM limitations and can't use the ElementInternals API. 2. Try to reimplement native logic in JavaScript, which is error-prone, often less performant, and cannot replicate certain platform-internal behaviors. 3. Accept that their custom elements simply can't do what native elements can do. This creates a gap between what's possible with native elements and custom elements, limiting web components and forcing developers into suboptimal patterns.
Docs: https://docs.google.com/document/d/1LA1hhzxmi4OmZoGtIdnwvL3g7y48YjXTOoUvFtxFugE/edit?usp=sharing
Samples: https://microsoftedge.github.io/Demos/platform-provided-behaviors-for-custom-elements
Explainers: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/PlatformProvidedBehaviors/explainer.md