Fix example in Keep attributes in sync (#591) · w3ctag/design-principles@afb192e
ylafon
·
2025-09-18
·
via Recent Commits to design-principles:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -27,7 +27,10 @@ Link Defaults: html (dfn) queue a task/in parallel/reflect
|
27 | 27 | <pre class="link-defaults"> |
28 | 28 | spec:css-cascade-5; type:dfn; text:inherit |
29 | 29 | 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 |
31 | 34 | spec:payment-request; type:attribute; for:PaymentRequest; text:[[state]] |
32 | 35 | spec:remote-playback; type:dfn; text: remote playback device |
33 | 36 | spec:webidl |
@@ -1159,8 +1162,8 @@ A new IDL attribute does not always warrant a content attribute counterpart.
|
1159 | 1162 | <div class="example"> |
1160 | 1163 | A counterpattern to this guidance can be found in |
1161 | 1164 | <{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. |
1164 | 1167 | </div> |
1165 | 1168 | |
1166 | 1169 | <h3 id="naming-of-url-attributes">Name URL-containing attributes based on their primary purpose</h3><!-- https://github.com/w3ctag/design-principles/issues/278 --> |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。