File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -277,11 +277,28 @@ although they may be harder to find.
277
277
Simpler features are easier for user agents to implement and test,
278
278
more likely to be interoperable,
279
279
and easier for authors to understand.
280
+ It is especially important to design your feature so that
281
+ the most common use cases are easy to accomplish.
280
282
281
283
Make sure that your <a href="#priority-of-constituencies">user needs</a>
282
284
are well-defined.
283
285
This allows you to avoid scope creep,
284
286
and make sure that your API does actually meet the needs of all users.
287
+ Of course,
288
+ complex or rare use cases are also worth solving,
289
+ though their solutions may be more complicated to use.
290
+ As Alan Kay said,
291
+ "simple things should be simple, complex things should be possible."
292
+
293
+ Do note however that while common cases are often simple,
294
+ commonality and complexity are not always correlated.
295
+
296
+ <div class=example>
297
+ Sanitizing HTML to prevent XSS attacks is a complex process
298
+ that requires extensive security knowledge,
299
+ however the [Sanitizer API] (https://wicg.github.io/sanitizer-api/) provides a shortcut for this common use case.
300
+ It also permits simpler types of filtering, but with more configuration.
301
+ </div>
285
302
286
303
See also:
287
304
You can’t perform that action at this time.
0 commit comments