File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1641,6 +1641,13 @@ This is for legacy interoperability reasons,
1641
1641
not as an example of good design.
1642
1642
</div>
1643
1643
1644
+ The default value should be the value
1645
+ that most authors will choose,
1646
+ if that choice is obvious.
1647
+ For boolean attributes,
1648
+ that might mean that the attribute name
1649
+ needs to be chosen so that `false` is the common choice.
1650
+
1644
1651
When deciding between different list data types for your API,
1645
1652
unless otherwise required, use the following list types:
1646
1653
@@ -1651,6 +1658,7 @@ unless otherwise required, use the following list types:
1651
1658
See also:
1652
1659
1653
1660
* [[#prefer-dictionaries]]
1661
+ * [[#naming-optional-parameters]]
1654
1662
* <a href="https://lists.w3.org/Archives/Public/public-script-coord/2013OctDec/0302.html">APIs that have boolean arguments defaulting to true</a>
1655
1663
1656
1664
<h3 id="naming-optional-parameters">Name optional arguments appropriately</h3>
You can’t perform that action at this time.
0 commit comments