From e861f774ab38e53124d3fb9f31ec079344b99dce Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Wed, 15 May 2019 15:17:36 -0400 Subject: [PATCH] Code review tweaks; thanks Anne --- source | 51 ++++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/source b/source index a9c010df0a9..5a624c8cf68 100644 --- a/source +++ b/source @@ -55452,7 +55452,7 @@ control.setSelectionRange(oldStart + prefix.length, oldEnd + prefix.length, oldD form-associated custom elements. Form-associated custom elements can have a custom validity error message set via their ElementInternals object's - setValidity() method. The user agent should use the + setValidity() method. The user agent should use the custom validity error message when alerting the user to the problem with the control.

@@ -55473,7 +55473,7 @@ control.setSelectionRange(oldStart + prefix.length, oldEnd + prefix.length, oldD select elements and controls in radio button groups, as specified in their sections.

-

When the setValidity() method sets +

When the setValidity() method sets valueMissing flag to true for a form-associated custom element.

@@ -55486,7 +55486,7 @@ control.setSelectionRange(oldStart + prefix.length, oldEnd + prefix.length, oldD data-x="attr-input-type-email">E-mail, URL).

-

When the setValidity() method sets +

When the setValidity() method sets typeMismatch flag to true for a form-associated custom element.

@@ -55497,7 +55497,7 @@ control.setSelectionRange(oldStart + prefix.length, oldEnd + prefix.length, oldD

When a control has a value that doesn't satisfy the pattern attribute.

-

When the setValidity() method sets +

When the setValidity() method sets patternMismatch flag to true for a form-associated custom element.

@@ -55510,7 +55510,7 @@ control.setSelectionRange(oldStart + prefix.length, oldEnd + prefix.length, oldD (input maxlength, textarea maxlength).

-

When the setValidity() method sets +

When the setValidity() method sets tooLong flag to true for a form-associated custom element.

@@ -55523,7 +55523,7 @@ control.setSelectionRange(oldStart + prefix.length, oldEnd + prefix.length, oldD (input minlength, textarea minlength).

-

When the setValidity() method sets +

When the setValidity() method sets tooShort flag to true for a form-associated custom element.

@@ -55534,7 +55534,7 @@ control.setSelectionRange(oldStart + prefix.length, oldEnd + prefix.length, oldD

When a control has a value that is not the empty string and is too low for the min attribute.

-

When the setValidity() method sets +

When the setValidity() method sets rangeUnderflow flag to true for a form-associated custom element.

@@ -55545,7 +55545,7 @@ control.setSelectionRange(oldStart + prefix.length, oldEnd + prefix.length, oldD

When a control has a value that is not the empty string and is too high for the max attribute.

-

When the setValidity() method sets +

When the setValidity() method sets rangeOverflow flag to true for a form-associated custom element.

@@ -55556,7 +55556,7 @@ control.setSelectionRange(oldStart + prefix.length, oldEnd + prefix.length, oldD

When a control has a value that doesn't fit the rules given by the step attribute.

-

When the setValidity() method sets +

When the setValidity() method sets stepMismatch flag to true for a form-associated custom element.

@@ -55567,7 +55567,7 @@ control.setSelectionRange(oldStart + prefix.length, oldEnd + prefix.length, oldD

When a control has incomplete input and the user agent does not think the user ought to be able to submit the form in its current state.

-

When the setValidity() method sets +

When the setValidity() method sets badInput flag to true for a form-associated custom element.

@@ -55576,7 +55576,7 @@ control.setSelectionRange(oldStart + prefix.length, oldEnd + prefix.length, oldD

When a control's custom validity error message (as set by the element's setCustomValidity() method or - ElementInternals's setValidity() method) is + ElementInternals's setValidity() method) is not the empty string.

@@ -66328,10 +66328,10 @@ document.body.appendChild(flagIcon) -

Just adding static formAssociated property with true makes an - autonomous custom element a form-associated custom element. +

Adding a static formAssociated property, with a true value, makes an + autonomous custom element a form-associated custom element. The ElementInternals interface helps you to implement functions and properties common - in form control elements.

+ to form control elements.

class MyCheckbox extends HTMLElement {
   static get formAssociated() { return true; }
@@ -67886,12 +67886,12 @@ interface ElementInternals {
 
   // Form-associated custom elements
 
-  void setFormValue((File or USVString or FormData)? value,
+  void setFormValue((File or USVString or FormData)? value,
                     optional (File or USVString or FormData)? state);
 
   readonly attribute HTMLFormElement? form;
 
-  void setValidity(ValidityStateFlags flags,
+  void setValidity(ValidityStateFlags flags,
                    optional DOMString message,
                    optional HTMLElement anchor);
   readonly attribute boolean willValidate;
@@ -67917,7 +67917,7 @@ dictionary ValidityStateFlags {
 };
-
internals . setFormValue(value)
+
internals . setFormValue(value)

Sets both the state and submission value of internals's @@ -67926,7 +67926,7 @@ dictionary ValidityStateFlags {

If value is null, the element won't participate in form submission.

-
internals . setFormValue(value, +
internals . setFormValue(value, state)

Sets the submission value of @@ -67940,7 +67940,7 @@ dictionary ValidityStateFlags {

Returns the form owner of internals's target element.

-
internals . setValidity(flags, +
internals . setValidity(flags, message [, anchor ])

Marks internals's target element as suffering from the constraints indicated by the flags argument, and sets the element's @@ -67950,7 +67950,7 @@ dictionary ValidityStateFlags { interactively or reportValidity() is called.

-
internals . setValidity({})
+
internals . setValidity({})

Marks internals's target element as satisfying its constraints.

@@ -68046,9 +68046,10 @@ dictionary ValidityStateFlags { data-x="face-state">state can be null, a string, a File, or a list of entries.

-

The setFormValue() method is used by the custom element - author to set the element's submission value and state, thus communicating these to the user agent.

+

The setFormValue() method is used by + the custom element author to set the element's submission + value and state, thus communicating these to the user + agent.

When the user agent believes it is a good idea to restore a form-associated custom element's state, for example after navigation or @@ -68084,7 +68085,7 @@ dictionary ValidityStateFlags {

-

The setFormValue(value, +

The setFormValue(value, state) method of the ElementInternals interface must run the following steps:

@@ -68128,7 +68129,7 @@ dictionary ValidityStateFlags {

Each form-associated custom element has a validation anchor element. It is null initially.

-

The setValidity(flags, +

The setValidity(flags, message, anchor) method of the ElementInternals interface must run the following steps: