code: function validate(manifest) {
    var errors = [];
  
    errors = validateEnum(manifest, 'dir', ENUM_DIR, errors);
    errors = validateLang(manifest, errors);
  
    [
      'name',
      'short_name',
      'description',
      'scope',
      'color',
      'background_color',
      'theme_color'
    ].forEach(function(member) {
      errors = validateString(manifest, member, errors);
    });
  
    errors = validateStartUrl(manifest, errors);
    errors = validateImages(manifest, 'icons', 'icon', errors);
    errors = validateImages(manifest, 'screenshots', 'screenshot', errors);
    errors = validateEnum(manifest, 'display', ENUM_DISPLAY, errors);
    errors = validateEnum(manifest, 'orientation', ENUM_ORIENTATION, errors);
    errors = validatePreferRelatedApplications(manifest, errors);
    errors = validatePreferredApplications(manifest, errors);
  
    errors = validateKnownProperties('manifest', manifest, MEMBERS, errors);
  
    return errors;
  }
docs: See "Manifest and its members" in https://w3c.github.io/manifest/