webext-schema 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -31,7 +31,7 @@
31
31
  "camelize": "^1.0.0",
32
32
  "commander": "^9.1.0",
33
33
  "decamelize": "^6.0.0",
34
- "json5": "^2.2.0",
34
+ "json5": "^2.2.1",
35
35
  "node-fetch": "^3.2.3",
36
36
  "sinon": "^13.0.1"
37
37
  },
@@ -48,5 +48,5 @@
48
48
  "nock": "^13.2.4",
49
49
  "npm-run-all": "^4.1.5"
50
50
  },
51
- "version": "2.2.0"
51
+ "version": "2.2.1"
52
52
  }
@@ -5000,6 +5000,11 @@
5000
5000
  "type": "string",
5001
5001
  "optional": true,
5002
5002
  "description": "The title used for display if the tab is created in discarded mode."
5003
+ },
5004
+ "muted": {
5005
+ "type": "boolean",
5006
+ "optional": true,
5007
+ "description": "Whether the tab should be muted when created."
5003
5008
  }
5004
5009
  }
5005
5010
  },
@@ -15749,13 +15754,11 @@
15749
15754
  },
15750
15755
  {
15751
15756
  "name": "onSuspend",
15752
- "unsupported": true,
15753
15757
  "type": "function",
15754
15758
  "description": "Sent to the event page just before it is unloaded. This gives the extension opportunity to do some clean up. Note that since the page is unloading, any asynchronous operations started while handling this event are not guaranteed to complete. If more activity for the event page occurs before it gets unloaded the onSuspendCanceled event will be sent and the page won't be unloaded. "
15755
15759
  },
15756
15760
  {
15757
15761
  "name": "onSuspendCanceled",
15758
- "unsupported": true,
15759
15762
  "type": "function",
15760
15763
  "description": "Sent after onSuspend to indicate that the app won't be unloaded after all."
15761
15764
  },
@@ -2121,13 +2121,11 @@
2121
2121
  },
2122
2122
  {
2123
2123
  "name": "onSuspend",
2124
- "unsupported": true,
2125
2124
  "type": "function",
2126
2125
  "description": "Sent to the event page just before it is unloaded. This gives the extension opportunity to do some clean up. Note that since the page is unloading, any asynchronous operations started while handling this event are not guaranteed to complete. If more activity for the event page occurs before it gets unloaded the onSuspendCanceled event will be sent and the page won't be unloaded. "
2127
2126
  },
2128
2127
  {
2129
2128
  "name": "onSuspendCanceled",
2130
- "unsupported": true,
2131
2129
  "type": "function",
2132
2130
  "description": "Sent after onSuspend to indicate that the app won't be unloaded after all."
2133
2131
  },
@@ -4853,7 +4851,7 @@
4853
4851
  "properties": {
4854
4852
  "aborted": {
4855
4853
  "type": "boolean",
4856
- "description": "Set this to true if the file upload was aborted.",
4854
+ "description": "Set this to true if the file upload was aborted by the user and an :ref:`cloudFile.onFileUploadAbort` event has been received. No error message will be shown to the user.",
4857
4855
  "optional": true
4858
4856
  },
4859
4857
  "error": {
@@ -5435,6 +5433,14 @@
5435
5433
  "description": "Whether the message is an HTML message or a plain text message.",
5436
5434
  "optional": true
5437
5435
  },
5436
+ "customHeaders": {
5437
+ "type": "array",
5438
+ "items": {
5439
+ "$ref": "CustomHeader"
5440
+ },
5441
+ "description": "Array of custom headers. Headers will be returned in ``Http-Header-Case`` (a.k.a. ``Train-Case``)",
5442
+ "optional": true
5443
+ },
5438
5444
  "attachments": {
5439
5445
  "type": "array",
5440
5446
  "items": {
@@ -5491,6 +5497,21 @@
5491
5497
  "description": "The size in bytes of this attachment. Read-only."
5492
5498
  }
5493
5499
  }
5500
+ },
5501
+ {
5502
+ "id": "CustomHeader",
5503
+ "type": "object",
5504
+ "description": "A custom header definition.",
5505
+ "properties": {
5506
+ "name": {
5507
+ "type": "string",
5508
+ "description": "Name of a custom header, must have a ``X-`` prefix.",
5509
+ "pattern": "^X-.*$"
5510
+ },
5511
+ "value": {
5512
+ "type": "string"
5513
+ }
5514
+ }
5494
5515
  }
5495
5516
  ],
5496
5517
  "events": [
@@ -10026,6 +10047,132 @@
10026
10047
  ]
10027
10048
  }
10028
10049
  ],
10050
+ "spacesToolbar.json": [
10051
+ {
10052
+ "namespace": "spacesToolbar",
10053
+ "types": [
10054
+ {
10055
+ "id": "ButtonProperties",
10056
+ "type": "object",
10057
+ "properties": {
10058
+ "badgeBackgroundColor": {
10059
+ "choices": [
10060
+ {
10061
+ "type": "string"
10062
+ },
10063
+ {
10064
+ "$ref": "ColorArray"
10065
+ }
10066
+ ],
10067
+ "optional": true,
10068
+ "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 <code>[255, 0, 0, 255]</code>. Can also be a string with an HTML color name (<code>red</code>) or a HEX color value (<code>#FF0000</code> or <code>#F00</code>). Reset when set to an empty string."
10069
+ },
10070
+ "badgeText": {
10071
+ "type": "string",
10072
+ "optional": true,
10073
+ "description": "Sets the badge text for the spaces toolbar button. 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."
10074
+ },
10075
+ "defaultIcons": {
10076
+ "choices": [
10077
+ {
10078
+ "type": "string"
10079
+ },
10080
+ {
10081
+ "$ref": "manifest.IconPath"
10082
+ }
10083
+ ],
10084
+ "optional": true,
10085
+ "description": "Either a relative image path defining a single icon used for all sizes or an IconPathDictionary object defining dedicated icons for different sizes. At least the ``16px`` icon should be specified. The ``32px`` icon will be used on screens with a very high pixel density, if specified. Defaults to the extension icon, if set to an empty string."
10086
+ },
10087
+ "themeIcons": {
10088
+ "type": "array",
10089
+ "optional": true,
10090
+ "items": {
10091
+ "$ref": "manifest.ThemeIcons"
10092
+ },
10093
+ "description": "Specifies dark and light icons for the spaces toolbar button to be used with themes: The ``light`` icons will be used on dark backgrounds and vice versa. At least the set for ``16px`` icons should be specified. The set for ``32px`` icons will be used on screens with a very high pixel density, if specified."
10094
+ },
10095
+ "title": {
10096
+ "type": "string",
10097
+ "optional": true,
10098
+ "description": "The title for the spaces toolbar button, used in the tooltip of the button and as the displayed name in the overflow menu. Defaults to the name of the extension, if set to an empty string."
10099
+ },
10100
+ "url": {
10101
+ "type": "string",
10102
+ "optional": true,
10103
+ "description": "The page url, loaded into a tab when the button is clicked. Supported are ``https://`` and ``http://`` links, as well as links to WebExtension pages."
10104
+ }
10105
+ }
10106
+ },
10107
+ {
10108
+ "id": "ColorArray",
10109
+ "description": "An array of four integers in the range [0,255] that make up the RGBA color. For example, opaque red is <code>[255, 0, 0, 255]</code>.",
10110
+ "type": "array",
10111
+ "items": {
10112
+ "type": "integer",
10113
+ "minimum": 0,
10114
+ "maximum": 255
10115
+ },
10116
+ "minItems": 4,
10117
+ "maxItems": 4
10118
+ }
10119
+ ],
10120
+ "functions": [
10121
+ {
10122
+ "name": "addButton",
10123
+ "type": "function",
10124
+ "description": "Adds a new button to the spaces toolbar. Throws an exception, if the used ``id`` is not unique within the extension.",
10125
+ "async": true,
10126
+ "parameters": [
10127
+ {
10128
+ "name": "id",
10129
+ "type": "string",
10130
+ "pattern": "^[a-zA-Z0-9_]+$",
10131
+ "description": "The unique id to assign to this button. May only contain alphanumeric characters and underscores."
10132
+ },
10133
+ {
10134
+ "name": "properties",
10135
+ "description": "Properties of the new button. The ``url`` is mandatory.",
10136
+ "$ref": "spacesToolbar.ButtonProperties"
10137
+ }
10138
+ ]
10139
+ },
10140
+ {
10141
+ "name": "removeButton",
10142
+ "type": "function",
10143
+ "description": "Removes the specified button from the spaces toolbar. Throws an exception if the requested spaces toolbar button does not exist. If the tab of this button is currently open, it will be closed.",
10144
+ "async": true,
10145
+ "parameters": [
10146
+ {
10147
+ "name": "id",
10148
+ "type": "string",
10149
+ "pattern": "^[a-zA-Z0-9_]+$",
10150
+ "description": "The id of the button which is to be removed. May only contain alphanumeric characters and underscores."
10151
+ }
10152
+ ]
10153
+ },
10154
+ {
10155
+ "name": "updateButton",
10156
+ "type": "function",
10157
+ "description": "Updates properties of the specified spaces toolbar button. Throws an exception if the requested spaces toolbar button does not exist.",
10158
+ "async": true,
10159
+ "parameters": [
10160
+ {
10161
+ "name": "id",
10162
+ "type": "string",
10163
+ "description": "The id of the button which is to be updated. May only contain alphanumeric characters and underscores.",
10164
+ "pattern": "^[a-zA-Z0-9_]+$"
10165
+ },
10166
+ {
10167
+ "name": "properties",
10168
+ "description": "Only specified properties will be updated.",
10169
+ "$ref": "spacesToolbar.ButtonProperties"
10170
+ }
10171
+ ]
10172
+ }
10173
+ ]
10174
+ }
10175
+ ],
10029
10176
  "tabs.json": [
10030
10177
  {
10031
10178
  "namespace": "manifest",
@@ -15206,7 +15206,8 @@
15206
15206
  "s390x",
15207
15207
  "sparc64",
15208
15208
  "x86-32",
15209
- "x86-64"
15209
+ "x86-64",
15210
+ "noarch"
15210
15211
  ],
15211
15212
  "allowedContexts": [
15212
15213
  "content",
@@ -16028,6 +16029,65 @@
16028
16029
  "description": "Details specifying the target into which to inject the CSS."
16029
16030
  }
16030
16031
  }
16032
+ },
16033
+ {
16034
+ "id": "ContentScriptFilter",
16035
+ "type": "object",
16036
+ "properties": {
16037
+ "ids": {
16038
+ "type": "array",
16039
+ "optional": true,
16040
+ "description": "The IDs of specific scripts to retrieve with <code>getRegisteredContentScripts()</code> or to unregister with <code>unregisterContentScripts()</code>.",
16041
+ "items": {
16042
+ "type": "string"
16043
+ }
16044
+ }
16045
+ }
16046
+ },
16047
+ {
16048
+ "id": "RegisteredContentScript",
16049
+ "type": "object",
16050
+ "properties": {
16051
+ "allFrames": {
16052
+ "type": "boolean",
16053
+ "optional": true,
16054
+ "description": "If specified true, it will inject into all frames, even if the frame is not the top-most frame in the tab. Each frame is checked independently for URL requirements; it will not inject into child frames if the URL requirements are not met. Defaults to false, meaning that only the top frame is matched."
16055
+ },
16056
+ "excludeMatches": {
16057
+ "type": "array",
16058
+ "optional": true,
16059
+ "description": "Excludes pages that this content script would otherwise be injected into.",
16060
+ "items": {
16061
+ "type": "string"
16062
+ }
16063
+ },
16064
+ "id": {
16065
+ "type": "string",
16066
+ "description": "The id of the content script, specified in the API call."
16067
+ },
16068
+ "js": {
16069
+ "type": "array",
16070
+ "optional": true,
16071
+ "description": "The list of JavaScript files to be injected into matching pages. These are injected in the order they appear in this array.",
16072
+ "items": {
16073
+ "$ref": "manifest.ExtensionURL"
16074
+ }
16075
+ },
16076
+ "matches": {
16077
+ "type": "array",
16078
+ "optional": true,
16079
+ "description": "Specifies which pages this content script will be injected into. Must be specified for <code>registerContentScripts()</code>.",
16080
+ "items": {
16081
+ "type": "string"
16082
+ }
16083
+ },
16084
+ "runAt": {
16085
+ "$ref": "extensionTypes.RunAt",
16086
+ "optional": true,
16087
+ "default": "document_idle",
16088
+ "description": "Specifies when JavaScript files are injected into the web page. The preferred and default value is <code>document_idle</code>."
16089
+ }
16090
+ }
16031
16091
  }
16032
16092
  ],
16033
16093
  "functions": [
@@ -16095,6 +16155,76 @@
16095
16155
  "parameters": []
16096
16156
  }
16097
16157
  ]
16158
+ },
16159
+ {
16160
+ "name": "registerContentScripts",
16161
+ "type": "function",
16162
+ "description": "Registers one or more content scripts for this extension.",
16163
+ "async": "callback",
16164
+ "parameters": [
16165
+ {
16166
+ "name": "scripts",
16167
+ "type": "array",
16168
+ "description": "Contains a list of scripts to be registered. If there are errors during script parsing/file validation, or if the IDs specified already exist, then no scripts are registered.",
16169
+ "items": {
16170
+ "$ref": "RegisteredContentScript"
16171
+ }
16172
+ },
16173
+ {
16174
+ "name": "callback",
16175
+ "type": "function",
16176
+ "description": "Invoked upon completion of the registration.",
16177
+ "parameters": []
16178
+ }
16179
+ ]
16180
+ },
16181
+ {
16182
+ "name": "getRegisteredContentScripts",
16183
+ "type": "function",
16184
+ "description": "Returns all dynamically registered content scripts for this extension that match the given filter.",
16185
+ "async": "callback",
16186
+ "parameters": [
16187
+ {
16188
+ "name": "filter",
16189
+ "$ref": "ContentScriptFilter",
16190
+ "optional": true,
16191
+ "description": "An object to filter the extension's dynamically registered scripts."
16192
+ },
16193
+ {
16194
+ "name": "callback",
16195
+ "type": "function",
16196
+ "description": "The resulting array contains the registered content scripts.",
16197
+ "parameters": [
16198
+ {
16199
+ "name": "scripts",
16200
+ "type": "array",
16201
+ "items": {
16202
+ "$ref": "RegisteredContentScript"
16203
+ }
16204
+ }
16205
+ ]
16206
+ }
16207
+ ]
16208
+ },
16209
+ {
16210
+ "name": "unregisterContentScripts",
16211
+ "type": "function",
16212
+ "description": "Unregisters one or more content scripts for this extension.",
16213
+ "async": "callback",
16214
+ "parameters": [
16215
+ {
16216
+ "name": "filter",
16217
+ "$ref": "ContentScriptFilter",
16218
+ "optional": true,
16219
+ "description": "If specified, only unregisters dynamic content scripts which match the filter. Otherwise, all of the extension's dynamic content scripts are unregistered."
16220
+ },
16221
+ {
16222
+ "name": "callback",
16223
+ "type": "function",
16224
+ "description": "Invoked upon completion of the unregistration.",
16225
+ "parameters": []
16226
+ }
16227
+ ]
16098
16228
  }
16099
16229
  ]
16100
16230
  }