Revision control
Copy as Markdown
Other Tools
[
{
"namespace": "spaces",
"types": [
{
"id": "SpaceButtonProperties",
"choices": [
{
"max_manifest_version": 2,
"type": "object",
"properties": {
"badgeBackgroundColor": {
"choices": [
{
"type": "string"
},
{
"$ref": "spaces.ColorArray"
}
],
"optional": true,
"description": "Sets the background color of the badge. Can be specified as an array of four integers in the range [0,255] that make up the RGBA color of the badge. For example, opaque red is <var>[255, 0, 0, 255]</var>. Can also be a string with an HTML color name (<var>red</var>) or a HEX color value (<var>#FF0000</var> or <var>#F00</var>). Reset when set to an empty string."
},
"badgeText": {
"type": "string",
"optional": true,
"description": "Sets the badge text for the button in the spaces toolbar. The badge is displayed on top of the icon. Any number of characters can be set, but only about four can fit in the space. Removed when set to an empty string."
},
"defaultIcons": {
"choices": [
{
"type": "string"
},
{
"$ref": "manifest.IconPath"
}
],
"optional": true,
"description": "The paths to one or more icons for the button in the spaces toolbar. Reset to the extension icon, when set to an empty string."
},
"themeIcons": {
"type": "array",
"optional": true,
"items": {
"$ref": "manifest.ThemeIcons"
},
"description": "Specifies dark and light icons for the button in the spaces toolbar to be used with themes: The <var>light</var> icons will be used on dark backgrounds and vice versa. At least the set for <em>16px</em> icons should be specified. The set for <em>32px</em> icons will be used on screens with a very high pixel density, if specified. Reset when set to an empty array."
},
"title": {
"type": "string",
"optional": true,
"description": "The title for the button in the spaces toolbar, used in the tooltip of the button and as the displayed name in the overflow menu. Reset to the name of the extension, when set to an empty string."
}
}
},
{
"min_manifest_version": 3,
"type": "object",
"properties": {
"badgeBackgroundColor": {
"choices": [
{
"type": "string"
},
{
"$ref": "spaces.ColorArray"
}
],
"optional": "omit-key-if-missing",
"description": "Sets the background color of the badge. Can be specified as an array of four integers in the range [0,255] that make up the RGBA color of the badge. For example, opaque red is <var>[255, 0, 0, 255]</var>. Can also be a string with an HTML color name (<var>red</var>) or a HEX color value (<var>#FF0000</var> or <var>#F00</var>). Reset when set to <var>null</var>."
},
"badgeText": {
"type": "string",
"optional": "omit-key-if-missing",
"description": "Sets the badge text for the button in the spaces toolbar. The badge is displayed on top of the icon. Any number of characters can be set, but only about four can fit in the space. Removed when set to <var>null</var>."
},
"defaultIcons": {
"$ref": "manifest.IconPath",
"optional": "omit-key-if-missing",
"description": "The paths to one or more icons for the button in the spaces toolbar. Reset to the extension icon, when set to <var>null</var>."
},
"themeIcons": {
"type": "array",
"optional": "omit-key-if-missing",
"items": {
"$ref": "manifest.ThemeIcons"
},
"description": "Specifies dark and light icons for the button in the spaces toolbar to be used with themes: The <var>light</var> icons will be used on dark backgrounds and vice versa. At least the set for <em>16px</em> icons should be specified. The set for <em>32px</em> icons will be used on screens with a very high pixel density, if specified. Reset when set to <var>null</var>."
},
"title": {
"type": "string",
"optional": "omit-key-if-missing",
"description": "The title for the button in the spaces toolbar, used in the tooltip of the button and as the displayed name in the overflow menu. Reset to the name of the extension, when set to <var>null</var>."
}
}
}
]
},
{
"id": "ColorArray",
"description": "An array of four integers in the range [0,255] that make up the RGBA color. For example, opaque red is <var>[255, 0, 0, 255]</var>.",
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 255
},
"minItems": 4,
"maxItems": 4
},
{
"id": "Space",
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The id of the space.",
"minimum": 1
},
"name": {
"type": "string",
"pattern": "^[a-zA-Z0-9_]+$",
"description": "The name of the space. Names are unique for a single extension, but different extensions may use the same name."
},
"isBuiltIn": {
"type": "boolean",
"description": "Whether this space is one of the default Thunderbird spaces, or an extension space."
},
"isSelfOwned": {
"type": "boolean",
"description": "Whether this space was created by this extension."
},
"extensionId": {
"type": "string",
"optional": true,
"description": "The id of the extension which owns the space. The <permission>management</permission> permission is required to include this property."
}
}
}
],
"functions": [
{
"name": "create",
"type": "function",
"description": "Creates a new space and adds its button to the spaces toolbar.",
"async": "callback",
"parameters": [
{
"name": "name",
"type": "string",
"pattern": "^[a-zA-Z0-9_]+$",
"description": "The name to assign to this space. May only contain alphanumeric characters and underscores. Must be unique for this extension."
},
{
"name": "defaultUrl",
"type": "string",
"description": "The default space url, loaded into a tab when the button in the spaces toolbar is clicked. Supported are <var>https://</var> and <var>http://</var> links, as well as links to WebExtension pages."
},
{
"name": "buttonProperties",
"description": "Properties of the button for the new space.",
"$ref": "spaces.SpaceButtonProperties",
"optional": true,
"default": {}
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"name": "space",
"$ref": "spaces.Space"
}
]
}
]
},
{
"name": "get",
"type": "function",
"description": "Retrieves details about the specified space.",
"async": "callback",
"parameters": [
{
"name": "spaceId",
"type": "integer",
"description": "The id of the space.",
"minimum": 1
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"name": "space",
"$ref": "spaces.Space"
}
]
}
]
},
{
"name": "query",
"type": "function",
"description": "Gets all spaces that have the specified properties, or all spaces if no properties are specified.",
"async": "callback",
"parameters": [
{
"type": "object",
"name": "queryInfo",
"optional": true,
"default": {},
"properties": {
"id": {
"type": "integer",
"max_manifest_version": 2,
"description": "The id of the space.",
"optional": true,
"minimum": 1
},
"spaceId": {
"type": "integer",
"min_manifest_version": 3,
"description": "The id of the space.",
"optional": true,
"minimum": 1
},
"name": {
"type": "string",
"pattern": "^[a-zA-Z0-9_]+$",
"optional": true,
"description": "The name of the spaces (names are not unique)."
},
"isBuiltIn": {
"type": "boolean",
"optional": true,
"description": "Spaces should be default Thunderbird spaces."
},
"isSelfOwned": {
"type": "boolean",
"optional": true,
"description": "Spaces should have been created by this extension."
},
"extensionId": {
"type": "string",
"optional": true,
"description": "Id of the extension which should own the spaces. The <permission>management</permission> permission is required to be able to match against extension ids."
}
}
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"name": "result",
"type": "array",
"items": {
"$ref": "spaces.Space"
}
}
]
}
]
},
{
"name": "remove",
"type": "function",
"description": "Removes the specified space, closes all its tabs and removes its button from the spaces toolbar. Throws an exception if the requested space does not exist or was not created by this extension.",
"async": true,
"parameters": [
{
"name": "spaceId",
"type": "integer",
"description": "The id of the space.",
"minimum": 1
}
]
},
{
"name": "update",
"type": "function",
"description": "Updates the specified space. Throws an exception if the requested space does not exist or was not created by this extension.",
"async": true,
"parameters": [
{
"name": "spaceId",
"type": "integer",
"description": "The id of the space.",
"minimum": 1
},
{
"name": "defaultUrl",
"type": "string",
"description": "The default space url, loaded into a tab when the button in the spaces toolbar is clicked. Supported are <var>https://</var> and <var>http://</var> links, as well as links to WebExtension pages.",
"optional": true
},
{
"name": "buttonProperties",
"description": "Only specified button properties will be updated.",
"$ref": "spaces.SpaceButtonProperties",
"optional": true
}
]
},
{
"name": "open",
"type": "function",
"description": "Opens or switches to the specified space. Throws an exception if the requested space does not exist or was not created by this extension.",
"async": "callback",
"parameters": [
{
"name": "spaceId",
"type": "integer",
"description": "The id of the space.",
"minimum": 1
},
{
"name": "windowId",
"type": "integer",
"minimum": -2,
"optional": true,
"description": "The id of the normal window, where the space should be opened. Defaults to the most recent normal window."
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"name": "tab",
"$ref": "tabs.Tab",
"description": "Details about the opened or activated space tab."
}
]
}
]
}
]
}
]