Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardHTMLform-associated custom elements ElementInternalsSingle-choice MCQ

For a class to use `ElementInternals` form features (setFormValue/setValidity, formAssociatedCallback), what static declaration and lifecycle wiring must exist, and what happens if it is missing when `attachInternals()` is called?

class MyControl extends HTMLElement { static formAssociated = true; constructor() { super(); this._internals = this.attachInternals(); } }