Skip to content

Commit afb192e

Browse files
authored
Fix example in Keep attributes in sync (#591)
1 parent c35b9cd commit afb192e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

index.bs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ Link Defaults: html (dfn) queue a task/in parallel/reflect
2727
<pre class="link-defaults">
2828
spec:css-cascade-5; type:dfn; text:inherit
2929
spec:css2; type: property; text: line-height
30-
spec:html; type:event; text:resize
30+
spec:html
31+
type:event; text:resize
32+
type:attribute; for:HTMLInputElement; text:defaultValue
33+
type:attribute; for:HTMLInputElement; text:defaultChecked
3134
spec:payment-request; type:attribute; for:PaymentRequest; text:[[state]]
3235
spec:remote-playback; type:dfn; text: remote playback device
3336
spec:webidl
@@ -1159,8 +1162,8 @@ A new IDL attribute does not always warrant a content attribute counterpart.
11591162
<div class="example">
11601163
A counterpattern to this guidance can be found in
11611164
<{input}>'s <{input/value}>, <{option}>'s <{option/selected}>, and <{input}>'s <{input/checked}>
1162-
where the HTML attributes were never updated
1163-
and the IDL attribute was the single source of truth.
1165+
where the content attributes are not reflected to IDL attributes with the same names.
1166+
Their IDL attributes are {{defaultValue}}, {{defaultSelected}} and {{defaultChecked}} respectively.
11641167
</div>
11651168

11661169
<h3 id="naming-of-url-attributes">Name URL-containing attributes based on their primary purpose</h3><!-- https://github.com/w3ctag/design-principles/issues/278 -->

0 commit comments

Comments
 (0)