code: function writeFlagsNote(supportData, browserId) {
    let output = '';
  
    const firefoxPrefs = 'To change preferences in Firefox, visit about:config.';
    const chromePrefs = 'To change preferences in Chrome, visit chrome://flags.';
  
    if (typeof(supportData.version_added) === 'string') {
      output = `From version ${supportData.version_added}`;
    }
  
    if (typeof(supportData.version_removed) === 'string') {
      if (output) {
        output += ` until version ${supportData.version_removed} (exclusive)`;
      } else {
        output = `Until version ${supportData.version_removed} (exclusive)`;
      }
    }
  
    let flagTextStart = 'This';
    if (output) {
      output += ':';
      flagTextStart = ' this';
    }
  
    let flagText = `${flagTextStart} feature is behind the <code>${supportData.flag.name}</code>`;
  
    // value_to_set is optional
    let valueToSet = '';
    if (supportData.flag.value_to_set) {
      valueToSet = ` (needs to be set to <code>${supportData.flag.value_to_set}</code>)`;
    }
  
    if (supportData.flag.type === 'preference') {
      let prefSettings = '';
      switch (browserId) {
        case 'firefox':
        case 'firefox_android':
          prefSettings = firefoxPrefs;
        break;
        case 'chrome':
        case 'chrome_android':
          prefSettings = chromePrefs;
        break;
      }
      output += `${flagText} preference${valueToSet}. ${prefSettings}`;
    }
  
    return output;
  }
docs: /*
  Generate the note for a browser flag or preference
  First checks version_added and version_removed to create a string indicating when
  a preference setting is present. Then creates a (browser specific) string
  for either a preference flag or a compile flag.
  
  `supportData` is a support_statement
  `browserId` is a compat_block browser ID