Summary#
Add HTML form-related elements to the parser and DOM tree, and implement their DOM interfaces.
Elements to support#
<form>→HTMLFormElement<input>→HTMLInputElement(types: text, password, checkbox, radio, submit, reset, hidden, number, email, url, search, tel)<textarea>→HTMLTextAreaElement<select>→HTMLSelectElement<option>→HTMLOptionElement<optgroup>→HTMLOptGroupElement<button>→HTMLButtonElement<label>→HTMLLabelElement<fieldset>→HTMLFieldSetElement<legend>→HTMLLegendElement
Acceptance criteria#
- HTML parser tokenizes and tree-builds all listed elements correctly
- DOM nodes expose element-specific attributes (e.g.,
input.type,input.value,input.name,form.action,form.method,textarea.rows,select.multiple) HTMLFormElement.elementsreturns a collection of associated form controlsHTMLInputElement.form,HTMLSelectElement.form, etc. return the owning form<label>forattribute resolves to the labeled control- Unit tests cover parsing and attribute access for each element type
Notes#
This is the foundation issue for Phase 16. All other form issues depend on this.