Permalink
Browse files

Fix example of output element to use ids instead of names

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.

Fixes #3312.
  • Loading branch information...
frigus02 authored and domenic committed Jan 2, 2018
1 parent fdd60d3 commit 58a8817ee90dff89c9b751bc693764dc0a83c0ce
Showing with 4 additions and 3 deletions.
  1. +4 −3 source
View
7 source
@@ -51384,9 +51384,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=a type=number step=any> +
&lt;input id=b type=number step=any> =
&lt;output id=o for="a b">&lt;/output>
&lt;/form></pre>
</div>
@@ -121039,6 +121039,7 @@ INSERT INTERFACES HERE
James Perrett,
James Robinson,
Jamie Lokier,
Jan K&uuml;hle, <!-- frigus02 on GitHub -->
Jan Miksovsky,
Janusz Majnert,
Jan-Klaas Kollhof,

0 comments on commit 58a8817

Please sign in to comment.