array

TBD

For simple arrays with only string values see the flat-array policy type.

Example JSON output

{
  "policies": {
    "Bookmarks": [
      {
        "Placement": "toolbar",
        "Title": "soeren-hentzschel.at",
        "URL": "https://www.soeren-hentzschel.at"
      }
    ]
  }
}

Example screenshot

Example implementation

const policies = {
  Bookmarks : {
    first_available : { mainstream : '60.0', esr : '60.0' },
    ui_category : 'customization',
    type : 'array',
    items : [
      {
        name : 'Title',
        label : browser.i18n.getMessage('policy_description_Bookmarks_Title'),
        mandatory : true,
        type : 'string'
      },
      {
        name : 'URL',
        label : browser.i18n.getMessage('common_url'),
        mandatory : true,
        type : 'url'
      },
      {
        name : 'Placement',
        label : browser.i18n.getMessage('policy_description_Bookmarks_Placement'),
        mandatory : false,
        type : 'enum',
        options : [
          {
            label : browser.i18n.getMessage('policy_description_Bookmarks_Placement_Toolbar'),
            value : 'toolbar'
          },
          {
            label : browser.i18n.getMessage('policy_description_Bookmarks_Placement_Menu'),
            value : 'menu'
          }
        ]
      }
    ]
  }
}

Last updated