Skip to content

Support external form elements#10

Merged
kbond merged 3 commits intozenstruck:1.xfrom
smnandre:feature/form-attribute-support
Feb 12, 2026
Merged

Support external form elements#10
kbond merged 3 commits intozenstruck:1.xfrom
smnandre:feature/form-attribute-support

Conversation

@smnandre
Copy link
Contributor

Support the HTML5 form attribute which allows form elements to be
associated with a form even when not nested inside it.

(Tried another way for #7 )

  • Add merge() and reduce() methods to Nodes for immutable filtering
  • Add root() method to Node for document root access
  • Update Form to exclude elements with form attribute pointing elsewhere
  • Update Element::form() to resolve form attribute before closest ancestor

Support the HTML5 `form` attribute which allows form elements to be
associated with a form even when not nested inside it.

- Add `merge()` and `reduce()` methods to Nodes for immutable filtering
- Add `root()` method to Node for document root access
- Update Form to exclude elements with form attribute pointing elsewhere
- Update Element::form() to resolve form attribute before closest ancestor
Copy link
Member

@kbond kbond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@kbond kbond merged commit 5625eea into zenstruck:1.x Feb 12, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants