Skip to content

Commit

Permalink
Fix example of output element to use ids instead of names
Browse files Browse the repository at this point in the history
The first example of the output element incorrectly referenced input
elements in the "for" attribute by their names. This changes the
example to reference input elements by their ids instead (whatwg#3312).
  • Loading branch information
frigus02 committed Dec 28, 2017
1 parent ffbe80e commit 7082bcd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -51381,9 +51381,9 @@ interface <dfn>HTMLOutputElement</dfn> : <span>HTMLElement</span> {
<p>A simple calculator could use <code>output</code> for its display of calculated results:</p>

<pre>&lt;form onsubmit="return false" oninput="o.value = a.valueAsNumber + b.valueAsNumber">
&lt;input name=a type=number step=any> +
&lt;input name=b type=number step=any> =
&lt;output name=o for="a b">&lt;/output>
&lt;input id="number-a" name=a type=number step=any> +
&lt;input id="number-b" name=b type=number step=any> =
&lt;output name=o for="number-a number-b">&lt;/output>
&lt;/form></pre>

</div>
Expand Down Expand Up @@ -121036,6 +121036,7 @@ INSERT INTERFACES HERE
James Perrett,
James Robinson,
Jamie Lokier,
Jan K&uuml;hle, <!-- frigus02 on GitHub -->
Jan Miksovsky,
Janusz Majnert,
Jan-Klaas Kollhof,
Expand Down

0 comments on commit 7082bcd

Please sign in to comment.