Skip to content

Commit

Permalink
modernize
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Aug 14, 2024
1 parent a1033b5 commit d361427
Showing 1 changed file with 34 additions and 27 deletions.
61 changes: 34 additions & 27 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -81759,36 +81759,43 @@ body { display:none }
data-x="attr-input-type-password">Password</span> states.<span w-nodev> (This behavior is included
in the <span>used autocorrection state</span> algorithm below.)</span></p>

<p>Each element is in one of two <dfn data-x="autocorrection state">autocorrection
states</dfn>:</p>
<p>The <dfn element-attr for="html-global"><code
data-x="attr-autocorrect">autocorrect</code></dfn> attribute is an enumerated attribute with the
following keywords and states:</p>

<dl>
<dt><dfn data-x="concept-autocorrection-on">on</dfn>
<dd>The user agent may automatically correct spelling errors while the user types. Whether
spelling is automatically corrected while typing left is for the user agent to decide, and may
depend on the element as well as the user's preferences.

<dt><dfn data-x="concept-autocorrection-off">off</dfn>
<dd>The user agent should not automatically correct spelling while the user types.
</dl>

<p>The <dfn><code data-x="attr-autocorrect">autocorrect</code></dfn> attribute is an enumerated
attribute whose keywords are <dfn><code data-x="attr-autocorrect-on">on</code></dfn> and
<dfn><code data-x="attr-autocorrect-off">off</code></dfn>. The <code data-x="">off</code> keyword
maps to the <span data-x="concept-autocorrection-on">off</span> state. The <code
data-x="">on</code> keyword maps to the <span data-x="concept-autocorrection-on">on</span> state.
The <i data-x="invalid value default">invalid value default</i> and the <i data-x="missing value
default">missing value default</i> are both the <span data-x="concept-autocorrection-on">on</span>
state.</p>
<table>
<thead>
<tr>
<th>Keyword
<th>State
<th>Brief description
<tbody>
<tr>
<td>"<dfn><code data-x="attr-autocorrect-on">on</code></dfn>"
<td><dfn data-x="concept-autocorrection-on">on</dfn>
<td>The user agent is permitted to automatically correct spelling errors while the user types.
Whether spelling is automatically corrected while typing left is for the user agent to decide,
and may depend on the element as well as the user's preferences.
<tr>
<td>"<dfn><code data-x="attr-autocorrect-off">off</code></dfn>"
<td><dfn data-x="concept-autocorrection-off">off</dfn>
<td>The user agent is not allowed to automatically correct spelling while the user types.
</table>

<p>The <dfn><code data-x="dom-autocorrect">autocorrect</code></dfn> getter steps are: if the
element's <span>used autocorrection state</span> is <span
data-x="concept-autocorrection-on">on</span>, then return true; otherwise return false. The setter
steps are: if the given value is true, then set the element's <code
data-x="attr-autocorrect">autocorrect</code> attribute to "<code data-x="">on</code>"; otherwise
set it to "<code data-x="">off</code>".</p>
<p>The attribute's <i data-x="invalid value default">invalid value default</i> and <i
data-x="missing value default">missing value default</i> are both the <span
data-x="concept-autocorrection-on">on</span> state.</p>

<p>To compute the <dfn>used autocorrection state</dfn> of an element <var>element</var>:</p>
<p>The <dfn attribute for="HTMLElement"><code data-x="dom-autocorrect">autocorrect</code></dfn>
getter steps are: return true if the element's <span>used autocorrection state</span> is <span
data-x="concept-autocorrection-on">on</span> and false if the element's <span>used autocorrection
state</span> is <span data-x="concept-autocorrection-on">off</span>. The setter steps are: if the
new value is true, then the element's <code data-x="attr-autocorrect">autocorrect</code> attribute
must be set to "<code data-x="">on</code>"; otherwise it must be set to "<code
data-x="">off</code>".</p>

<p>To compute the <dfn>used autocorrection state</dfn> of an element <var>element</var>, run these
steps:</p>

<ol>
<li><p>If <var>element</var> is an <code>input</code> element whose <code
Expand Down

0 comments on commit d361427

Please sign in to comment.