-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Conversation
There was a problem hiding this 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
{{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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
|
||
{{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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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>
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 🎉
Part of #35544