From fbb1c7de652290c3ab455f5c8f1d83a598942fc9 Mon Sep 17 00:00:00 2001 From: Kaleidea <74888177+Kaleidea@users.noreply.github.com> Date: Wed, 1 Dec 2021 12:16:59 +0100 Subject: [PATCH] Editorial: "form elements" -> "forms", etc. --- source | 423 +++++++++++++++++++++++++++++++++------------------------ 1 file changed, 247 insertions(+), 176 deletions(-) diff --git a/source b/source index 1848f28ff2b..2b886aa2a6b 100644 --- a/source +++ b/source @@ -7592,7 +7592,7 @@ interface HTMLAllCollection {
The HTMLFormControlsCollection
interface is used for
collections of listed
- elements in form
elements.
[Exposed=Window]
interface HTMLFormControlsCollection : HTMLCollection {
@@ -9863,8 +9863,8 @@ partial interface Document {
document.forms
- Returns an HTMLCollection
of the form
elements in the
- Document
.
+ Returns an HTMLCollection
of the forms
+ (form
or search
elements) in the Document
.
document.scripts
@@ -9898,7 +9898,8 @@ partial interface Document {
The forms
attribute must return an HTMLCollection
rooted at the Document
node,
- whose filter matches only form
elements.
+ whose filter matches only forms
+ (form
or search
elements).
The scripts
attribute must return an HTMLCollection
rooted at the Document
node,
@@ -9975,7 +9976,8 @@ partial interface Document {
the value of the name
content attribute for all
exposed embed
, form
, iframe
,
- img
, and exposed object
elements that have a non-empty
+ img
, search
,
+ and exposed object
elements that have a non-empty
name
content attribute and are in a document tree with
document as their root;
@@ -10034,7 +10036,8 @@ partial interface Document {
- Exposed
embed
, form
, iframe
,
- img
, or exposed object
elements that have a img
, search
,
+ and exposed object
elements that have a name
content attribute whose value is name, or
- Exposed
object
elements that have an HTMLBaseElement : HTMLElement {
If there are multiple base
elements with target
attributes, all but the first are ignored.
- To get an element's target, given an a
, area
, or
- form
element element, run these steps:
+
To get an element's target, given an a
, area
,
+ form
, or search
element element, run these steps:
If element has a target
attribute, then return that
@@ -23158,7 +23161,8 @@ document.body.appendChild(wbr);
Links are a conceptual construct, created by a
, area
,
- form
, and link
elements, that represent
+ form
, search
,
+ and link
elements, that represent
a connection between two resources, one of which is the current Document
. There are
two kinds of links in HTML:
href
attribute.
- Similarly, for form
elements with a rel
+
Similarly, for forms
+ with a rel
attribute, links must be created for the keywords of the rel
attribute as defined for those keywords in the link types section.
- form
elements that do not have a rel
attribute,
+ forms
+ that do not have a rel
attribute,
or whose rel
attribute has no keywords that are defined as
specifying hyperlinks, must also create a hyperlink.
@@ -23831,11 +23837,12 @@ document.body.appendChild(wbr);
This is also used by form submission for
- the form
element. The exception for a
elements is for compatibility with
- web content.
a
elements is for
+ compatibility with web content.
- To get an element's noopener, given an a
, area
, or
- form
element element and a string target:
To get an element's noopener, given an a
, area
,
+ form
, or search
+ element element and a string target:
If element's link types include the To determine which link types apply to a The The For The The The The The The The The The The The The One of the following: A form is a component of a web page that has form controls, such as text, buttons, checkboxes,
- range, or color picker controls. A user can interact with such a form, providing data that can
- then be sent to the server for further processing (e.g. returning the results of a search or
+ A form is a component of a web page that groups form controls, such as text, buttons,
+ checkboxes, range, or color picker controls. A user can interact with the form controls,
+ inputting data. The form can submit all the data in its form controls in one batch to the
+ server for further processing (e.g. returning the results of a search or
calculation). No client-side scripting is needed in many cases, though an API is available so that
scripts can augment the user experience or use forms for purposes other than submitting data to a
server. Form submissions are exposed to servers in a variety of ways, most commonly as HTTP GET or POST
requests. To specify the exact method used, the Denotes elements that can be used for constructing the entry list when a
- Denotes elements that can be affected when a Denotes elements that can be affected when a form is
+ reset. The A form
+ represents a hyperlink that can be
manipulated through a collection of form-associated
elements, some of which can represent editable values that can be submitted to a server for
processing. The The The To determine the value of an indexed property for a
- Each Each form
+ has a mapping of names to elements called the past names
map. It is used to persist names of controls even when they change names. The supported property names consist of the names obtained from the following
@@ -43643,7 +43668,8 @@ interface HTMLFormElement : HTMLElement {
For each listed element candidate
- whose form owner is the For each To determine the value of a named property name
- for a Let candidates be a live If candidates is empty, let candidates be a live
If candidates is empty, name is the name of one of
- the entries in the If candidates contains more than one node, return candidates. Otherwise, candidates contains exactly one node. Add a mapping from
- name to the node in candidates in the Return the node in candidates. If an element listed in a If an element listed in a form's
+ past names map changes
form owner, then its entries must be removed from that map. Otherwise, if element has an ancestor Otherwise, if element has an ancestor
+ form, then associate element with the nearest such
- ancestor This example is a non-conforming document, though, as it is a violation of the content models
- to nest The Attributes for form submission can be specified both on Attributes for form submission can be specified both on
+ forms
and on submit buttons (elements that represent buttons
that submit forms, e.g. an The attributes for form submission that may be specified on In this example, a When the user agent is required to statically validate the constraints of
- If a user agent is to interactively validate the constraints of If a user agent is to interactively validate the constraints of
+ form
+ form, then the user agent must run the following steps: Statically validate the constraints of form, and let
@@ -56687,9 +56736,9 @@ fur
A If the user agent supports letting the user submit a form implicitly (for example, on some
platforms hitting the "enter" key while a text control is focused implicitly submits
@@ -56704,12 +56753,14 @@ fur
If the form has
no submit button, then the implicit submission
mechanism must do nothing if the form has more than one field that blocks implicit
- submission, and must submit the For the purpose of the previous paragraph, an element is a field that blocks implicit
- submission of a Each Each form has a constructing entry list
+ boolean, initially false. Each Each form has a firing submission events
+ boolean, initially false. When a Each Each form
+ has a planned navigation, which is either null or a
+ task; when the
+ form is first created, its
planned navigation must be set to null. In the behaviors described below, when the
user agent is required to plan to navigate to a particular resource destination, it must run the following steps: If the If the form's
+ link types include the If the If the form has a non-null
+ planned navigation, remove it from its task queue. Queue an element task on the DOM manipulation task source given
- the Set the Set the form's
+ planned navigation to null. Navigate target browsing context to
destination, with historyHandling set to
@@ -56949,8 +57004,8 @@ fur
Set the Set the form's planned navigation
+ to the just-queued task. The behaviors are as follows: Let encoding be the document's character encoding. If the Let input be the value of the Let input be the value of the form's Let candidate encoding labels be the result of form. Operations on the When a You can use the custom element If element is a form-associated custom element, then: Reset the form owner of element. If element is
- associated with a If element is disabled, then
enqueue a custom element callback reaction with element, callback name
@@ -70565,7 +70621,8 @@ Demos:
constraint validation and that satisfy their
constraints Similarly, a The The Returns the current autocapitalization state for the element, or an empty string if it hasn't
been set. Note that for Can be set, to set the The Return element. If the If the Insert an HTML element for the token, and, if there is no If the stack of open elements does not have a Generate implied end tags. If the current node is not a If the current node is not a form,
+ then this is a parse error. Pop elements from the stack of open elements until a Pop elements from the stack of open elements until a
+ form ( Parse error. If there is a Otherwise: Insert an HTML element for the token, and set the Pop that Pop that form off the
+ stack of open elements. The The Set the parser's Set the parser's Specify the preferred persistent identifier using the Use the
link
, a
, area
,
- or form
element, the element's rel
attribute must be form, or search
element,
+ the element's rel
attribute must be split on ASCII whitespace. The resulting tokens
are the keywords for the link types that apply to that element.
@@ -24796,7 +24804,8 @@ document.body.appendChild(wbr);
link
- a
and area
+ form
form
external
keyword may be used with a
,
- area
, and form
elements. This keyword does not create a
+ area
, form
, and search
+ elements. This keyword does not create a
hyperlink, but annotates any other
hyperlinks created by the element (the implied hyperlink, if no other keywords create one).help
keyword may be used with link
,
- a
, area
, and form
elements. This keyword creates a
+ a
, area
, form
, and search
+ elements. This keyword creates a
hyperlink.a
, area
, and form
elements, the For
a
, area
, form
, and search
+ elements, the help
keyword indicates that the referenced document provides further help
information for the parent of the element defining the hyperlink, and its children.license
keyword may be used with link
,
- a
, area
, and form
elements. This keyword creates a
+ a
, area
, form
, and search
+ elements. This keyword creates a
hyperlink.license
keyword indicates that the referenced document
@@ -25297,7 +25309,8 @@ document.body.appendChild(wbr);
data-x="rel-nofollow">nofollow"
nofollow
keyword may be used with a
,
- area
, and form
elements. This keyword does not create a
+ area
, form
, and search
+ elements. This keyword does not create a
hyperlink, but annotates any other
hyperlinks created by the element (the implied hyperlink, if no other keywords create one).noopener
keyword may be used with a
,
- area
, and form
elements. This keyword does not create a
+ area
, form
, and search
+ elements. This keyword does not create a
hyperlink, but annotates any other
hyperlinks created by the element (the implied hyperlink, if no other keywords create one).noreferrer
keyword may be used with a
,
- area
, and form
elements. This keyword does not create a
+ area
, form
, and search
+ elements. This keyword does not create a
hyperlink, but annotates any other
hyperlinks created by the element (the implied hyperlink, if no other keywords create one).opener
keyword may be used with a
,
- area
, and form
elements. This keyword does not create a
+ area
, form
, and search
+ elements. This keyword does not create a
hyperlink, but annotates any other
hyperlinks created by the element (the implied hyperlink, if no other keywords create one).search
keyword may be used with link
,
- a
, area
, and form
elements. This keyword creates a
- hyperlink.a
, area
, form
, and search
+ elements. This keyword creates a hyperlink.
search
keyword indicates that the referenced document
provides an interface specifically for searching the document and its related resources.next
keyword may be used with link
,
- a
, area
, and form
elements. This keyword creates a
- hyperlink.a
, area
, form
, and search
+ elements. This keyword creates a hyperlink.
next
keyword indicates that the document is part of a
sequence, and that the link is leading to the document that is the next logical document in the
@@ -25970,8 +25986,8 @@ document.body.appendChild(wbr);
data-x="rel-prev">prev"
prev
keyword may be used with link
,
- a
, area
, and form
elements. This keyword creates a
- hyperlink.a
, area
, form
, and search
+ elements. This keyword creates a hyperlink.
prev
keyword indicates that the document is part of a
sequence, and that the link is leading to the document that is the previous logical document in
@@ -26059,26 +26075,26 @@ document.body.appendChild(wbr);
- form
form
and search
form
elements.form
elements; it creates a
+ form
elements; it creates an external
- resource link.form
elements; it annotates other hyperlinks created by the
- element.method
- attribute is specified on the form
element. This doesn't specify how the form data is
+ attribute is specified on the form.
+ This doesn't specify how the form data is
encoded, though; to specify that, you use the enctype
attribute. You also have to specify the URL of the service that will handle the
submitted data, using the action
attribute.form
element is submitted.
@@ -43342,8 +43361,8 @@ interface HTMLTableCellElement : HTMLElement {
form
element is reset.
@@ -43450,7 +43469,8 @@ interface HTMLFormElement : HTMLElement {
HTMLFormElement
.form
element represents a hyperlink that can be
+ UTF-8
".
name
attribute
- represents the form
's name within the forms
+ represents the form's
+ name within the forms
collection. The value must not be the empty string, and the value must be unique amongst the
form
elements in the forms
collection that
it is in, if any.rel
attribute on
- form
elements controls what kinds of links the elements create. The attribute's value
+ forms
+ controls what kinds of links the elements create. The attribute's value
must be a unordered set of unique space-separated tokens. The allowed keywords and their meanings are defined in an earlier section.rel
's supported
tokens are the keywords defined in HTML link types which are
- allowed on form
elements, impact the processing model, and are supported by the user
+ allowed on forms,
+ impact the processing model, and are supported by the user
agent. The possible supported tokens are noreferrer
, noopener
, and opener
. rel
's HTMLFormElement : HTMLElement {
elements
IDL attribute must return an HTMLFormControlsCollection
rooted at the
- form
element's root, whose filter matches form's root, whose filter matches listed elements whose form owner is the
- form
element, with the exception of input
elements whose type
attribute is in the form, with the exception of input
elements whose
+ type
attribute is in the Image Button state, which must, for historical reasons, be
excluded from this particular collection.form
element, the user agent must return the value returned by the form,
+ the user agent must return the value returned by the
item
method on the elements
collection, when invoked with the given index as its
argument.
- form
element has a mapping of names to elements called the past names
+ form
element, with the exception of any
+ whose form owner is the form,
+ with the exception of any
input
elements whose type
attribute is in the
Image Button state:img
element candidate whose form owner is the
- form
element:
@@ -43702,12 +43728,12 @@ interface HTMLFormElement : HTMLElement {
form
element, the user agent must run the following steps:
- RadioNodeList
object
containing all the listed elements, whose form
- owner is the form
element, that have either an is the form, that have either an
id
attribute or a name
attribute equal
to name, with the exception of input
elements whose type
attribute is in the HTMLFormElement : HTMLElement {
RadioNodeList
object containing all the img
elements, whose form
- owner is the form
element, that have either an is the form, that have either an
id
attribute or a name
attribute
equal to name, in tree order.form
element's past names map: return the object
- associated with name in that map.form
- element's past names map, replacing the previous entry with the same name, if
- any.form
element's past names map changes
+ form
element, then form
element.form
elements, and there is a parse error for the forms,
+ and there is a parse error for the
</form>
tag.name
content attribute gives the name of the form control, as
- used in form submission and in the form
element's form submission and in the form's
elements
object. If the attribute is specified, its value must
not be the empty string or isindex
.Form submission attributes
- form
elements
+ input
element whose type
attribute is in the Submit Button state).
- form
- elements are action
, The attributes for form submission that may be specified on
+ forms
+ are
action
, enctype
, method
, novalidate
, and target
.formnovalidate
, and formtarget
. When omitted, they default to the values given on
- the corresponding attributes on the form
element.
+ the corresponding attributes on the form.
@@ -53668,7 +53713,8 @@ form.method === input; // => true
dialog
, mapping to the state dialog, indicating that submitting the form
is
+ data-x="attr-fs-method-dialog">dialog, indicating that submitting the
+ form is
intended to close the dialog
box in which the form finds itself, if any, and
otherwise not submit.form
is used with a dialog
. The In this example, a form
+ is used with a
dialog
. The method
attribute's "dialog
" keyword is used to have the dialog
automatically close when the form is submitted.Constraint validation
form
element form, it must run the following steps, which return
+ a form
+ form, it must run the following steps, which return
either a positive result (all the controls in the form are valid) or a negative
result (there are invalid controls) along with a (possibly empty) list of elements that are
invalid and for which no script has claimed responsibility:form
- element form, then the user agent must run the following steps:
Implicit submission
- form
element's default button is the first A form's default button is the first submit button in tree order whose form
- owner is that form
element.form
- element from the form
element itself otherwise.form
element if it is an input
element whose
- form owner is that form
element and whose of a form
+ if it is an
input
element whose
+ form owner is that form and whose type
attribute is in one of the following states:
Text,
Search,
@@ -56732,13 +56783,13 @@ fur
Form submission algorithm
- form
element has a constructing entry list boolean, initially
- false.form
element has a firing submission events boolean, initially
- false.form
element form is When a form form is submitted from an element submitter
(typically a button), optionally with a submitted from submit()
method flag set, the user agent must run the
@@ -56917,8 +56968,10 @@ fur
defining this, act in a manner analogous to that defined in this specification for similar
schemes.form
element has a planned navigation, which is either null or a
- task; when the form
is first created, its
+ form
element's link types include the noreferrer
keyword, then set destination's referrer to "no-referrer
".form
has a non-null planned navigation, remove it from
- its task queue.form
element and the following steps:
-
form
's planned navigation to null.form
's planned navigation to the just-queued task.form
element has an If the form has an
accept-charset
attribute, set encoding to
the return value of running these substeps:
-
form
element's accept-charset
attribute.FormData
+ object will affect form data to be submitted.FormData
object associated to the entry
list that is constructed when the
- form
is submitted.
+ form is submitted.
Resetting a form
- form
element form is When a form form is reset, run these steps:
@@ -67721,7 +67776,8 @@ customElements.define('my-checkbox', MyCheckbox);
my-checkbox
like a built-in
form-associated element. For example, putting it in form
or label
associates the my-checkbox
element with them, and submitting the
- form
will send data provided by my-checkbox
implementation.
+ form
+ will send data provided by my-checkbox
implementation.
<form action="..." method="...">
@@ -68976,10 +69032,10 @@ customElements.define("x-foo", class extends HTMLElement {
form
element, then
+ associated with a form, then
enqueue a custom element callback reaction with element, callback
- name "formAssociatedCallback
", and « the associated form
- ».formAssociatedCallback
", and « the associated
+ form ».form
elements that are not the form owner of any elements that
+ form
elements that are the form owner of one or more elements
+ canvas
element with the hidden
attribute could be used by a scripted graphics engine as an off-screen buffer, and a form control
- could refer to a hidden form
element using its form using its
form
attribute.autocapitalize
attribute can be used on an editing host to control autocapitalization behavior for the hosted
editable region, on an input
or textarea
element to control the behavior
- for inputting text into that element, or on a form
element to control the default
+ for inputting text into that element, or on a form
+ to control the default
behavior for all autocapitalize-inheriting elements
- associated with the form
element.
+ associated with the form.
autocapitalize
attribute never causes
autocapitalization to be enabled for input
elements whose
input
and textarea
elements that inherit their
- state from a form
element, this will return the autocapitalization state of the
- form
element, but for an element in an editable region, this will not return the
- autocapitalization state of the editing host (unless this element is, in fact, the editing
- host).autocapitalize
content
attribute (and thereby change the autocapitalization behavior for the element).head
element pointer gets set to point to this node.
form
element pointer points to the last
- form
element that was opened and whose end tag has not yet been seen. It is used to
+ form (form
or search
element)
+ that was opened and whose end tag has not yet been seen. It is used to
make form controls associate with forms in the face of dramatically bad markup, for historical
reasons. It is ignored inside template
elements.form
element
pointer, then associate element
- with the form
element pointed to by the form
element
+ with the form pointed to by the
+ form
element
pointer and set element's parser inserted flag.
form
element pointer is not null, and there is
+ form
element pointer is not null, and there is
no template
element on the stack of open elements, then this is a
parse error; ignore the token.template
element on the stack of open elements, set the form
element pointer to point to the element created.
form
element in scope, then this is a parse
- error; return and ignore the token.form
element, then this is a
- parse error.form
- element has been popped from the stack.form
or search
element)
+ has been popped from the stack.template
element on the stack of open elements, or if
- the form
element pointer is not null, ignore the
+ the form
element pointer is not null, ignore the
token.form
element pointer to point to the element created.form
element off the stack of open elements.form
- element ancestor (use of the form
element pointer in the parser)form
element pointer in the parser)template
elements.
- html
head
body
form
id
="outer
"div
form
id
="inner
"input
input
element will be associated with the inner form
element.
+ input
element will be associated with the inner
+ form.
Now, if this tree structure is serialized and reparsed, the <form
id="inner">
start tag will be ignored, and so the input
element will be
- associated with the outer form
element instead.
@@ -116174,11 +116239,13 @@ console.assert(container.firstChild instanceof SuperP);
<html><head></head><body><form id="outer"><div><form id="inner"><input></form></div></form></body></html>
form
element pointer to the nearest node to the
- context element that is a form
- element (going straight up the ancestor chain, and including the element itself, if it is a
- form
element), if any. (If there is no such form
element, the
- form
element pointer keeps its initial value, null.)form
element pointer
+ to the nearest node to the context
+ element that is a form
+ (going straight up the ancestor chain, and including the element itself, if it is a
+ form), if any. (If there is no such
+ form, the
+ form
element pointer keeps its initial value, null.)urn
on link
elementshref
attribute instead.accept
on form
elementsaccept
on formsaccept
attribute directly on the input
elements instead.hreflang
on area
@@ -124120,7 +124187,7 @@ interface External {
select
;
textarea
;
form-associated custom elements
- Associates the element with a form
element
+ Associates the element with a form
ID*
formaction
@@ -125913,8 +125980,9 @@ INSERT INTERFACES HERE
formdata
FormDataEvent
- form
elements
- Fired at a form
element when it is constructing the entry list
+ forms
+ Fired at a form
+ when it is constructing the entry list
hashchange
@@ -126016,8 +126084,9 @@ INSERT INTERFACES HERE
reset
Event
- form
elements
- Fired at a form
element when it is reset
+ forms
+ Fired at a form
+ when it is reset
securitypolicyviolation
@@ -126046,8 +126115,9 @@ INSERT INTERFACES HERE
submit
SubmitEvent
- form
elements
- Fired at a form
element when it is submitted
+ forms
+ Fired at a form
+ when it is submitted
toggle
@@ -127455,6 +127525,7 @@ INSERT INTERFACES HERE
Ka-Sing Chou,
Kagami Sascha Rosylight,
Kai Hendry,
+ Kaleidea,
Kamishetty Sreeja,
呂康豪 (KangHao Lu),
Karl Dubost,