Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New pages for HTML*Element.form #35661

Merged
merged 2 commits into from
Sep 10, 2024
Merged

New pages for HTML*Element.form #35661

merged 2 commits into from
Sep 10, 2024

Conversation

Josh-Cena
Copy link
Member

Part of #35544

@Josh-Cena Josh-Cena requested a review from a team as a code owner August 31, 2024 19:08
@Josh-Cena Josh-Cena requested review from sideshowbarker and removed request for a team August 31, 2024 19:08
@github-actions github-actions bot added Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed labels Aug 31, 2024
@Josh-Cena Josh-Cena requested review from estelle and removed request for sideshowbarker August 31, 2024 19:09
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

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

minor edits and a question


{{APIRef("HTML DOM")}}

The **`form`** read-only property of the {{domxref("HTMLButtonElement")}} interface returns an {{domxref("HTMLFormElement")}} object that owns this button, or `null` if this button is not owned by any form.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The **`form`** read-only property of the {{domxref("HTMLButtonElement")}} interface returns an {{domxref("HTMLFormElement")}} object that owns this button, or `null` if this button is not owned by any form.
The **`form`** read-only property of the {{domxref("HTMLButtonElement")}} interface returns an {{domxref("HTMLFormElement")}} object that owns the {{htmlelement("button")}}, or `null` if this button is not owned by any form.

Copy link
Member

Choose a reason for hiding this comment

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

Not sure if we want to define that "owner" is either the form defined by the button's id attribute or the ancestor form if the attribute is not set, or that a button can only be associated with one form.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the precise definition of "owner", if we are to have one, should be in a guide article.

files/en-us/web/api/htmlfieldsetelement/form/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/htmlinputelement/form/index.md Outdated Show resolved Hide resolved
{{domxref("HTMLFormElement")}} object which represents the form of which the label's
associated control is a part, or null if there is either no associated control, or if
that control isn't in a form.
The **`form`** read-only property of the {{domxref("HTMLLabelElement")}} interface returns an {{domxref("HTMLFormElement")}} object that owns the {{domxref("HTMLLabelElement.control", "control")}} associated with this label, or `null` if this label is not associated with a control owned by a form.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The **`form`** read-only property of the {{domxref("HTMLLabelElement")}} interface returns an {{domxref("HTMLFormElement")}} object that owns the {{domxref("HTMLLabelElement.control", "control")}} associated with this label, or `null` if this label is not associated with a control owned by a form.
The **`form`** read-only property of the {{domxref("HTMLLabelElement")}} interface returns the {{domxref("HTMLFormElement")}} object that owns the form {{domxref("HTMLLabelElement.control", "control")}} the {{HTMLElement("label")}} is associated with, or `null` if the label is not associated with a control owned by a form.

Copy link
Member

Choose a reason for hiding this comment

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

do we want to mention the form attribute may be set on the associated form control, but not the label?

Copy link
Member Author

Choose a reason for hiding this comment

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

Well... a label is meant to be associated with a control anyway. "Labels associated with a form" without a control in the same form sounds useless to begin with.

files/en-us/web/api/htmlobjectelement/form/index.md Outdated Show resolved Hide resolved

{{APIRef("HTML DOM")}}

The **`form`** read-only property of the {{domxref("HTMLOptionElement")}} interface returns an {{domxref("HTMLFormElement")}} object that owns the {{domxref("HTMLSelectElement")}} associated with this option, or `null` if this option is not associated with a select owned by a form.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The **`form`** read-only property of the {{domxref("HTMLOptionElement")}} interface returns an {{domxref("HTMLFormElement")}} object that owns the {{domxref("HTMLSelectElement")}} associated with this option, or `null` if this option is not associated with a select owned by a form.
The **`form`** read-only property of the {{domxref("HTMLOptionElement")}} interface returns an {{domxref("HTMLFormElement")}} object that owns the {{domxref("HTMLSelectElement")}} associated with this option, or `null` if this {{htmlelement("option")}} is not associated with a {{htmlelement("select")}} owned by a form.

Copy link
Member

Choose a reason for hiding this comment

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

do options within a <datalist> have a form property?

Copy link
Member Author

Choose a reason for hiding this comment

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

No I don't think so. They can only be associated via the parent <select>.

files/en-us/web/api/htmloutputelement/form/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/htmlselectelement/form/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/htmltextareaelement/form/index.md Outdated Show resolved Hide resolved
@Josh-Cena Josh-Cena requested a review from estelle September 10, 2024 17:33
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

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

Thanks! 🎉

@estelle estelle merged commit 650feba into mdn:main Sep 10, 2024
8 checks passed
@Josh-Cena Josh-Cena deleted the form branch September 10, 2024 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants