|
350 | 350 | "id": "api-surface", |
351 | 351 | "href": "https://www.w3.org/TR/design-principles/#api-surface", |
352 | 352 | "level": 2, |
353 | | - "title": "JavaScript API Surface Concerns", |
| 353 | + "title": "Designing JavaScript APIs", |
354 | 354 | "number": "6" |
355 | 355 | }, |
| 356 | + { |
| 357 | + "id": "webidl-dictionaries-interfaces-namespaces", |
| 358 | + "href": "https://www.w3.org/TR/design-principles/#webidl-dictionaries-interfaces-namespaces", |
| 359 | + "level": 3, |
| 360 | + "title": "Use WebIDL dictionaries, interfaces, and namespaces appropriately", |
| 361 | + "number": "6.1" |
| 362 | + }, |
| 363 | + { |
| 364 | + "id": "dictionaries-for-configuration", |
| 365 | + "href": "https://www.w3.org/TR/design-principles/#dictionaries-for-configuration", |
| 366 | + "level": 4, |
| 367 | + "title": "Use Dictionaries for “Configuration” or “Input-Only” Data" |
| 368 | + }, |
| 369 | + { |
| 370 | + "id": "interface-for-functionality-state-identity", |
| 371 | + "href": "https://www.w3.org/TR/design-principles/#interface-for-functionality-state-identity", |
| 372 | + "level": 4, |
| 373 | + "title": "Choose an Interface for Functionality, State, and Identity" |
| 374 | + }, |
| 375 | + { |
| 376 | + "id": "interface-serializer", |
| 377 | + "href": "https://www.w3.org/TR/design-principles/#interface-serializer", |
| 378 | + "level": 4, |
| 379 | + "title": "Provide a serializer to make interface data more accessible" |
| 380 | + }, |
| 381 | + { |
| 382 | + "id": "namespace-to-avoid-fake-classes", |
| 383 | + "href": "https://www.w3.org/TR/design-principles/#namespace-to-avoid-fake-classes", |
| 384 | + "level": 4, |
| 385 | + "title": "Choose a namespace to Avoid “Fake Classes” for Behavior-Only Utilities" |
| 386 | + }, |
| 387 | + { |
| 388 | + "id": "pseudo-namespaces", |
| 389 | + "href": "https://www.w3.org/TR/design-principles/#pseudo-namespaces", |
| 390 | + "level": 4, |
| 391 | + "title": "\"Pseudo-namespaces\"" |
| 392 | + }, |
356 | 393 | { |
357 | 394 | "id": "attributes-like-data", |
358 | 395 | "href": "https://www.w3.org/TR/design-principles/#attributes-like-data", |
359 | 396 | "level": 3, |
360 | 397 | "title": "Attributes should behave like data properties", |
361 | | - "number": "6.1" |
| 398 | + "number": "6.2" |
362 | 399 | }, |
363 | 400 | { |
364 | 401 | "id": "live-vs-static", |
365 | 402 | "href": "https://www.w3.org/TR/design-principles/#live-vs-static", |
366 | 403 | "level": 3, |
367 | 404 | "title": "Consider whether objects should be live or static", |
368 | | - "number": "6.2" |
| 405 | + "number": "6.3" |
369 | 406 | }, |
370 | 407 | { |
371 | 408 | "id": "live-objects", |
|
384 | 421 | "href": "https://www.w3.org/TR/design-principles/#attributes-vs-methods", |
385 | 422 | "level": 3, |
386 | 423 | "title": "Accessors should behave like properties, not methods", |
387 | | - "number": "6.3" |
| 424 | + "number": "6.4" |
388 | 425 | }, |
389 | 426 | { |
390 | 427 | "id": "prefer-dictionaries", |
391 | 428 | "href": "https://www.w3.org/TR/design-principles/#prefer-dictionaries", |
392 | 429 | "level": 3, |
393 | 430 | "title": "Accept optional and/or primitive arguments through dictionaries", |
394 | | - "number": "6.4" |
| 431 | + "number": "6.5" |
395 | 432 | }, |
396 | 433 | { |
397 | 434 | "id": "optional-parameters", |
398 | 435 | "href": "https://www.w3.org/TR/design-principles/#optional-parameters", |
399 | 436 | "level": 3, |
400 | 437 | "title": "Make method arguments optional if possible", |
401 | | - "number": "6.5" |
| 438 | + "number": "6.6" |
402 | 439 | }, |
403 | 440 | { |
404 | 441 | "id": "naming-optional-parameters", |
405 | 442 | "href": "https://www.w3.org/TR/design-principles/#naming-optional-parameters", |
406 | 443 | "level": 3, |
407 | 444 | "title": "Name optional arguments appropriately", |
408 | | - "number": "6.6" |
| 445 | + "number": "6.7" |
409 | 446 | }, |
410 | 447 | { |
411 | 448 | "id": "overloading", |
412 | 449 | "href": "https://www.w3.org/TR/design-principles/#overloading", |
413 | 450 | "level": 3, |
414 | 451 | "title": "Use overloading wisely", |
415 | | - "number": "6.7" |
| 452 | + "number": "6.8" |
416 | 453 | }, |
417 | 454 | { |
418 | 455 | "id": "constructors", |
419 | 456 | "href": "https://www.w3.org/TR/design-principles/#constructors", |
420 | 457 | "level": 3, |
421 | 458 | "title": "Classes should have constructors when possible", |
422 | | - "number": "6.8" |
| 459 | + "number": "6.9" |
423 | 460 | }, |
424 | 461 | { |
425 | 462 | "id": "synchronous", |
426 | 463 | "href": "https://www.w3.org/TR/design-principles/#synchronous", |
427 | 464 | "level": 3, |
428 | 465 | "title": "Be synchronous when appropriate", |
429 | | - "number": "6.9" |
| 466 | + "number": "6.10" |
430 | 467 | }, |
431 | 468 | { |
432 | 469 | "id": "promises", |
433 | 470 | "href": "https://www.w3.org/TR/design-principles/#promises", |
434 | 471 | "level": 3, |
435 | 472 | "title": "Design asynchronous APIs using Promises", |
436 | | - "number": "6.10" |
| 473 | + "number": "6.11" |
437 | 474 | }, |
438 | 475 | { |
439 | 476 | "id": "sync-callbacks", |
|
446 | 483 | "href": "https://www.w3.org/TR/design-principles/#aborting", |
447 | 484 | "level": 3, |
448 | 485 | "title": "Cancel asynchronous APIs/operations using AbortSignal", |
449 | | - "number": "6.11" |
| 486 | + "number": "6.12" |
450 | 487 | }, |
451 | 488 | { |
452 | 489 | "id": "string-constants", |
453 | 490 | "href": "https://www.w3.org/TR/design-principles/#string-constants", |
454 | 491 | "level": 3, |
455 | 492 | "title": "Use strings for constants and enums", |
456 | | - "number": "6.12" |
| 493 | + "number": "6.13" |
457 | 494 | }, |
458 | 495 | { |
459 | 496 | "id": "async-by-default", |
460 | 497 | "href": "https://www.w3.org/TR/design-principles/#async-by-default", |
461 | 498 | "level": 3, |
462 | 499 | "title": "If you need both asynchronous and synchronous methods, synchronous is the exception", |
463 | | - "number": "6.13" |
| 500 | + "number": "6.14" |
464 | 501 | }, |
465 | 502 | { |
466 | 503 | "id": "uint8array", |
467 | 504 | "href": "https://www.w3.org/TR/design-principles/#uint8array", |
468 | 505 | "level": 3, |
469 | 506 | "title": "Output an array of bytes with Uint8Array", |
470 | | - "number": "6.14" |
| 507 | + "number": "6.15" |
471 | 508 | }, |
472 | 509 | { |
473 | 510 | "id": "void-functions", |
474 | 511 | "href": "https://www.w3.org/TR/design-principles/#void-functions", |
475 | 512 | "level": 3, |
476 | 513 | "title": "Return undefined from side-effect-causing functions", |
477 | | - "number": "6.15" |
| 514 | + "number": "6.16" |
478 | 515 | }, |
479 | 516 | { |
480 | 517 | "id": "event-design", |
|
0 commit comments