webext-schema 3.0.1 → 4.0.0

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.
@@ -403,7 +403,8 @@
403
403
  "additionalProperties": {
404
404
  "$ref": "experiments.ExperimentAPI"
405
405
  },
406
- "optional": true
406
+ "optional": true,
407
+ "privileged": true
407
408
  }
408
409
  }
409
410
  }
@@ -774,7 +775,8 @@
774
775
  "items": {
775
776
  "type": "string"
776
777
  },
777
- "optional": true
778
+ "optional": true,
779
+ "privileged": true
778
780
  }
779
781
  }
780
782
  }
@@ -5267,6 +5269,7 @@
5267
5269
  "type": "string",
5268
5270
  "enum": [
5269
5271
  "compose",
5272
+ "compose.save",
5270
5273
  "compose.send"
5271
5274
  ]
5272
5275
  }
@@ -5462,7 +5465,7 @@
5462
5465
  "html",
5463
5466
  "both"
5464
5467
  ],
5465
- "description": "Defines the mime format of the send message (ignored on plain text messages). Defaults to ``auto``, which will send html messages as plain text, if they do not include any formatting, and as ``both`` otherwise (a multipart/mixed message).",
5468
+ "description": "Defines the mime format of the sent message (ignored on plain text messages). Defaults to ``auto``, which will send html messages as plain text, if they do not include any formatting, and as ``both`` otherwise (a multipart/mixed message).",
5466
5469
  "optional": true
5467
5470
  },
5468
5471
  "customHeaders": {
@@ -6054,7 +6057,7 @@
6054
6057
  "compose.send"
6055
6058
  ],
6056
6059
  "type": "function",
6057
- "description": "Sends the message currently being composed.",
6060
+ "description": "Sends the message currently being composed. If the send mode is not specified or set to ``default``, the message will be send directly if the user is online and placed in the users outbox otherwise. The returned Promise fulfills once the message has been successfully sent or placed in the user's outbox. Throws when the send process has been aborted by the user, by an :ref:`onBeforeSend` event or if there has been an error while sending the message to the outgoing mail server.",
6058
6061
  "async": "callback",
6059
6062
  "parameters": [
6060
6063
  {
@@ -6079,12 +6082,90 @@
6079
6082
  {
6080
6083
  "type": "function",
6081
6084
  "name": "callback",
6082
- "description": "Returns false if the current state of the message composer prevented sending the message.",
6083
6085
  "optional": true,
6084
6086
  "parameters": [
6085
6087
  {
6086
6088
  "name": "return",
6087
- "type": "boolean"
6089
+ "type": "object",
6090
+ "properties": {
6091
+ "mode": {
6092
+ "type": "string",
6093
+ "description": "The used send mode.",
6094
+ "enum": [
6095
+ "sendNow",
6096
+ "sendLater"
6097
+ ]
6098
+ },
6099
+ "headerMessageId": {
6100
+ "type": "string",
6101
+ "description": "The header messageId of the outgoing message. Only included for actually sent messages.",
6102
+ "optional": true
6103
+ },
6104
+ "messages": {
6105
+ "type": "array",
6106
+ "items": {
6107
+ "$ref": "messages.MessageHeader"
6108
+ },
6109
+ "description": "Copies of the sent message. The number of created copies depends on the applied file carbon copy configuration (fcc)."
6110
+ }
6111
+ }
6112
+ }
6113
+ ]
6114
+ }
6115
+ ]
6116
+ },
6117
+ {
6118
+ "name": "saveMessage",
6119
+ "permissions": [
6120
+ "compose.save"
6121
+ ],
6122
+ "type": "function",
6123
+ "description": "Saves the message currently being composed as a draft or as a template. If the save mode is not specified, the message will be saved as a draft. The returned Promise fulfills once the message has been successfully saved.",
6124
+ "async": "callback",
6125
+ "parameters": [
6126
+ {
6127
+ "name": "tabId",
6128
+ "type": "integer"
6129
+ },
6130
+ {
6131
+ "name": "options",
6132
+ "type": "object",
6133
+ "optional": true,
6134
+ "properties": {
6135
+ "mode": {
6136
+ "type": "string",
6137
+ "enum": [
6138
+ "draft",
6139
+ "template"
6140
+ ]
6141
+ }
6142
+ }
6143
+ },
6144
+ {
6145
+ "type": "function",
6146
+ "name": "callback",
6147
+ "optional": true,
6148
+ "parameters": [
6149
+ {
6150
+ "name": "return",
6151
+ "type": "object",
6152
+ "properties": {
6153
+ "mode": {
6154
+ "type": "string",
6155
+ "description": "The used save mode.",
6156
+ "enum": [
6157
+ "draft",
6158
+ "template"
6159
+ ]
6160
+ },
6161
+ "messages": {
6162
+ "type": "array",
6163
+ "items": {
6164
+ "$ref": "messages.MessageHeader"
6165
+ },
6166
+ "description": "The saved message(s). The number of saved messages depends on the applied file carbon copy configuration (fcc)."
6167
+ }
6168
+ }
6088
6169
  }
6089
6170
  ]
6090
6171
  }
@@ -8853,6 +8934,62 @@
8853
8934
  ]
8854
8935
  }
8855
8936
  ]
8937
+ },
8938
+ {
8939
+ "name": "open",
8940
+ "type": "function",
8941
+ "description": "Opens a message in a new tab or in a new window.",
8942
+ "async": "callback",
8943
+ "parameters": [
8944
+ {
8945
+ "name": "openProperties",
8946
+ "type": "object",
8947
+ "description": "Settings for opening the message. Exactly one of messageId or headerMessageId must be specified.",
8948
+ "properties": {
8949
+ "messageId": {
8950
+ "type": "integer",
8951
+ "optional": true,
8952
+ "minimum": 1,
8953
+ "description": "The id of a message to be opened. Will throw, if the provided ``messageId`` is unknown or invalid."
8954
+ },
8955
+ "headerMessageId": {
8956
+ "type": "string",
8957
+ "optional": true,
8958
+ "description": "The headerMessageId of a message to be opened. Will throw, if the provided ``headerMessageId`` is unknown or invalid."
8959
+ },
8960
+ "location": {
8961
+ "type": "string",
8962
+ "enum": [
8963
+ "tab",
8964
+ "window"
8965
+ ],
8966
+ "optional": true,
8967
+ "description": "Where to open the message. If not specified, the users preference is honoured."
8968
+ },
8969
+ "active": {
8970
+ "type": "boolean",
8971
+ "optional": true,
8972
+ "description": "Whether the new tab should become the active tab in the window. Only applicable to messages opened in tabs."
8973
+ },
8974
+ "windowId": {
8975
+ "type": "integer",
8976
+ "minimum": -2,
8977
+ "optional": true,
8978
+ "description": "The id of the window, where the new tab should be created. Defaults to the current window. Only applicable to messages opened in tabs."
8979
+ }
8980
+ }
8981
+ },
8982
+ {
8983
+ "type": "function",
8984
+ "name": "callback",
8985
+ "parameters": [
8986
+ {
8987
+ "name": "tab",
8988
+ "$ref": "tabs.Tab"
8989
+ }
8990
+ ]
8991
+ }
8992
+ ]
8856
8993
  }
8857
8994
  ]
8858
8995
  }
@@ -9474,7 +9611,8 @@
9474
9611
  },
9475
9612
  "folder": {
9476
9613
  "$ref": "folders.MailFolder",
9477
- "description": "The <permission>accountsRead</permission> permission is required for this property to be included."
9614
+ "description": "The <permission>accountsRead</permission> permission is required for this property to be included.",
9615
+ "optional": true
9478
9616
  },
9479
9617
  "headerMessageId": {
9480
9618
  "type": "string",
@@ -10708,12 +10846,13 @@
10708
10846
  {
10709
10847
  "name": "create",
10710
10848
  "type": "function",
10711
- "description": "Creates a new tab.",
10849
+ "description": "Creates a new content tab. Use the :ref:`messageDisplay_api` to open messages.",
10712
10850
  "async": "callback",
10713
10851
  "parameters": [
10714
10852
  {
10715
10853
  "type": "object",
10716
10854
  "name": "createProperties",
10855
+ "description": "Properties for the new tab. Defaults to an empty tab, if no ``url`` is provided.",
10717
10856
  "properties": {
10718
10857
  "windowId": {
10719
10858
  "type": "integer",
@@ -10730,7 +10869,7 @@
10730
10869
  "url": {
10731
10870
  "type": "string",
10732
10871
  "optional": true,
10733
- "description": "The URL to navigate the tab to initially. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs will be relative to the current page within the extension. Defaults to the New Tab Page."
10872
+ "description": "The URL to navigate the tab to initially. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs will be relative to the current page within the extension."
10734
10873
  },
10735
10874
  "active": {
10736
10875
  "type": "boolean",
@@ -10903,16 +11042,17 @@
10903
11042
  {
10904
11043
  "type": "object",
10905
11044
  "name": "updateProperties",
11045
+ "description": "Properties which should to be updated.",
10906
11046
  "properties": {
10907
11047
  "url": {
10908
11048
  "type": "string",
10909
11049
  "optional": true,
10910
- "description": "A URL to navigate the tab to."
11050
+ "description": "A URL to navigate the tab to. Only applicable for ``content`` tabs and active ``mail`` tabs."
10911
11051
  },
10912
11052
  "active": {
10913
11053
  "type": "boolean",
10914
11054
  "optional": true,
10915
- "description": "Whether the tab should be active. Does not affect whether the window is focused (see :ref:`windows.update`)."
11055
+ "description": "Set this to true, if the tab should be active. Does not affect whether the window is focused (see :ref:`windows.update`). Setting this to false has no effect."
10916
11056
  }
10917
11057
  }
10918
11058
  },
@@ -2611,6 +2611,7 @@
2611
2611
  },
2612
2612
  "onclick": {
2613
2613
  "type": "function",
2614
+ "max_manifest_version": 2,
2614
2615
  "optional": true,
2615
2616
  "description": "A function that will be called back when the menu item is clicked. Event pages cannot use this; instead, they should register a listener for $(ref:contextMenus.onClicked).",
2616
2617
  "parameters": [
@@ -2766,6 +2767,7 @@
2766
2767
  },
2767
2768
  "onclick": {
2768
2769
  "type": "function",
2770
+ "max_manifest_version": 2,
2769
2771
  "optional": "omit-key-if-missing",
2770
2772
  "parameters": [
2771
2773
  {
@@ -4343,12 +4345,6 @@
4343
4345
  "optional": true,
4344
4346
  "description": "The ID of the tab that opened this tab, if any. This property is only present if the opener tab still exists."
4345
4347
  },
4346
- "selected": {
4347
- "type": "boolean",
4348
- "description": "Whether the tab is selected.",
4349
- "deprecated": "Please use $(ref:tabs.Tab.highlighted).",
4350
- "unsupported": true
4351
- },
4352
4348
  "highlighted": {
4353
4349
  "type": "boolean",
4354
4350
  "description": "Whether the tab is highlighted. Works as an alias of active"
@@ -4802,36 +4798,6 @@
4802
4798
  "description": "A port that can be used to communicate with the content scripts running in the specified tab. The port's $(ref:runtime.Port) event is fired if the tab closes or does not exist. "
4803
4799
  }
4804
4800
  },
4805
- {
4806
- "name": "sendRequest",
4807
- "deprecated": "Please use $(ref:runtime.sendMessage).",
4808
- "unsupported": true,
4809
- "type": "function",
4810
- "description": "Sends a single request to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The $(ref:extension.onRequest) event is fired in each content script running in the specified tab for the current extension.",
4811
- "parameters": [
4812
- {
4813
- "type": "integer",
4814
- "name": "tabId",
4815
- "minimum": 0
4816
- },
4817
- {
4818
- "type": "any",
4819
- "name": "request"
4820
- },
4821
- {
4822
- "type": "function",
4823
- "name": "responseCallback",
4824
- "optional": true,
4825
- "parameters": [
4826
- {
4827
- "name": "response",
4828
- "type": "any",
4829
- "description": "The JSON response object sent by the handler of the request. If an error occurs while connecting to the specified tab, the callback will be called with no arguments and $(ref:runtime.lastError) will be set to the error message."
4830
- }
4831
- ]
4832
- }
4833
- ]
4834
- },
4835
4801
  {
4836
4802
  "name": "sendMessage",
4837
4803
  "type": "function",
@@ -4874,63 +4840,6 @@
4874
4840
  }
4875
4841
  ]
4876
4842
  },
4877
- {
4878
- "name": "getSelected",
4879
- "deprecated": "Please use $(ref:tabs.query) <code>{active: true}</code>.",
4880
- "unsupported": true,
4881
- "type": "function",
4882
- "description": "Gets the tab that is selected in the specified window.",
4883
- "async": "callback",
4884
- "parameters": [
4885
- {
4886
- "type": "integer",
4887
- "name": "windowId",
4888
- "minimum": -2,
4889
- "optional": true,
4890
- "description": "Defaults to the $(topic:current-window)[current window]."
4891
- },
4892
- {
4893
- "type": "function",
4894
- "name": "callback",
4895
- "parameters": [
4896
- {
4897
- "name": "tab",
4898
- "$ref": "Tab"
4899
- }
4900
- ]
4901
- }
4902
- ]
4903
- },
4904
- {
4905
- "name": "getAllInWindow",
4906
- "deprecated": "Please use $(ref:tabs.query) <code>{windowId: windowId}</code>.",
4907
- "unsupported": true,
4908
- "type": "function",
4909
- "description": "Gets details about all tabs in the specified window.",
4910
- "async": "callback",
4911
- "parameters": [
4912
- {
4913
- "type": "integer",
4914
- "name": "windowId",
4915
- "minimum": -2,
4916
- "optional": true,
4917
- "description": "Defaults to the $(topic:current-window)[current window]."
4918
- },
4919
- {
4920
- "type": "function",
4921
- "name": "callback",
4922
- "parameters": [
4923
- {
4924
- "name": "tabs",
4925
- "type": "array",
4926
- "items": {
4927
- "$ref": "Tab"
4928
- }
4929
- }
4930
- ]
4931
- }
4932
- ]
4933
- },
4934
4843
  {
4935
4844
  "name": "create",
4936
4845
  "type": "function",
@@ -4963,13 +4872,6 @@
4963
4872
  "optional": true,
4964
4873
  "description": "Whether the tab should become the active tab in the window. Does not affect whether the window is focused (see $(ref:windows.update)). Defaults to <var>true</var>."
4965
4874
  },
4966
- "selected": {
4967
- "deprecated": "Please use <em>active</em>.",
4968
- "unsupported": true,
4969
- "type": "boolean",
4970
- "optional": true,
4971
- "description": "Whether the tab should become the selected tab in the window. Defaults to <var>true</var>"
4972
- },
4973
4875
  "pinned": {
4974
4876
  "type": "boolean",
4975
4877
  "optional": true,
@@ -5319,13 +5221,6 @@
5319
5221
  "optional": true,
5320
5222
  "description": "Adds or removes the tab from the current selection."
5321
5223
  },
5322
- "selected": {
5323
- "unsupported": true,
5324
- "deprecated": "Please use <em>highlighted</em>.",
5325
- "type": "boolean",
5326
- "optional": true,
5327
- "description": "Whether the tab should be selected."
5328
- },
5329
5224
  "pinned": {
5330
5225
  "type": "boolean",
5331
5226
  "optional": true,
@@ -5639,6 +5534,7 @@
5639
5534
  {
5640
5535
  "name": "executeScript",
5641
5536
  "type": "function",
5537
+ "max_manifest_version": 2,
5642
5538
  "description": "Injects JavaScript code into a page. For details, see the $(topic:content_scripts)[programmatic injection] section of the content scripts doc.",
5643
5539
  "async": "callback",
5644
5540
  "parameters": [
@@ -5676,6 +5572,7 @@
5676
5572
  {
5677
5573
  "name": "insertCSS",
5678
5574
  "type": "function",
5575
+ "max_manifest_version": 2,
5679
5576
  "description": "Injects CSS into a page. For details, see the $(topic:content_scripts)[programmatic injection] section of the content scripts doc.",
5680
5577
  "async": "callback",
5681
5578
  "parameters": [
@@ -5703,6 +5600,7 @@
5703
5600
  {
5704
5601
  "name": "removeCSS",
5705
5602
  "type": "function",
5603
+ "max_manifest_version": 2,
5706
5604
  "description": "Removes injected CSS from a page. For details, see the $(topic:content_scripts)[programmatic injection] section of the content scripts doc.",
5707
5605
  "async": "callback",
5708
5606
  "parameters": [
@@ -6170,58 +6068,6 @@
6170
6068
  }
6171
6069
  ]
6172
6070
  },
6173
- {
6174
- "name": "onSelectionChanged",
6175
- "deprecated": "Please use $(ref:tabs.onActivated).",
6176
- "unsupported": true,
6177
- "type": "function",
6178
- "description": "Fires when the selected tab in a window changes.",
6179
- "parameters": [
6180
- {
6181
- "type": "integer",
6182
- "name": "tabId",
6183
- "minimum": 0,
6184
- "description": "The ID of the tab that has become active."
6185
- },
6186
- {
6187
- "type": "object",
6188
- "name": "selectInfo",
6189
- "properties": {
6190
- "windowId": {
6191
- "type": "integer",
6192
- "minimum": 0,
6193
- "description": "The ID of the window the selected tab changed inside of."
6194
- }
6195
- }
6196
- }
6197
- ]
6198
- },
6199
- {
6200
- "name": "onActiveChanged",
6201
- "deprecated": "Please use $(ref:tabs.onActivated).",
6202
- "unsupported": true,
6203
- "type": "function",
6204
- "description": "Fires when the selected tab in a window changes. Note that the tab's URL may not be set at the time this event fired, but you can listen to $(ref:tabs.onUpdated) events to be notified when a URL is set.",
6205
- "parameters": [
6206
- {
6207
- "type": "integer",
6208
- "name": "tabId",
6209
- "minimum": 0,
6210
- "description": "The ID of the tab that has become active."
6211
- },
6212
- {
6213
- "type": "object",
6214
- "name": "selectInfo",
6215
- "properties": {
6216
- "windowId": {
6217
- "type": "integer",
6218
- "minimum": 0,
6219
- "description": "The ID of the window the selected tab changed inside of."
6220
- }
6221
- }
6222
- }
6223
- ]
6224
- },
6225
6071
  {
6226
6072
  "name": "onActivated",
6227
6073
  "type": "function",
@@ -6251,34 +6097,6 @@
6251
6097
  }
6252
6098
  ]
6253
6099
  },
6254
- {
6255
- "name": "onHighlightChanged",
6256
- "deprecated": "Please use $(ref:tabs.onHighlighted).",
6257
- "unsupported": true,
6258
- "type": "function",
6259
- "description": "Fired when the highlighted or selected tabs in a window changes.",
6260
- "parameters": [
6261
- {
6262
- "type": "object",
6263
- "name": "selectInfo",
6264
- "properties": {
6265
- "windowId": {
6266
- "type": "integer",
6267
- "minimum": 0,
6268
- "description": "The window whose tabs changed."
6269
- },
6270
- "tabIds": {
6271
- "type": "array",
6272
- "items": {
6273
- "type": "integer",
6274
- "minimum": 0
6275
- },
6276
- "description": "All highlighted tabs in the window."
6277
- }
6278
- }
6279
- }
6280
- ]
6281
- },
6282
6100
  {
6283
6101
  "name": "onHighlighted",
6284
6102
  "type": "function",
@@ -8982,6 +8800,7 @@
8982
8800
  "content_scripts.json": [
8983
8801
  {
8984
8802
  "namespace": "contentScripts",
8803
+ "max_manifest_version": 2,
8985
8804
  "types": [
8986
8805
  {
8987
8806
  "id": "RegisteredContentScriptOptions",
@@ -11331,7 +11150,6 @@
11331
11150
  {
11332
11151
  "name": "getBackgroundPage",
11333
11152
  "type": "function",
11334
- "max_manifest_version": 2,
11335
11153
  "description": "Returns the JavaScript 'window' object for the background page running inside the current extension. Returns null if the extension has no background page.",
11336
11154
  "parameters": [],
11337
11155
  "returns": {
@@ -15951,6 +15769,11 @@
15951
15769
  "world": {
15952
15770
  "$ref": "ExecutionWorld",
15953
15771
  "optional": true
15772
+ },
15773
+ "injectImmediately": {
15774
+ "type": "boolean",
15775
+ "optional": true,
15776
+ "description": "Whether the injection should be triggered in the target as soon as possible (but not necessarily prior to page load)."
15954
15777
  }
15955
15778
  }
15956
15779
  },
@@ -16479,6 +16302,23 @@
16479
16302
  }
16480
16303
  ]
16481
16304
  }
16305
+ ],
16306
+ "events": [
16307
+ {
16308
+ "name": "onChanged",
16309
+ "type": "function",
16310
+ "description": "Fired when one or more items change.",
16311
+ "parameters": [
16312
+ {
16313
+ "name": "changes",
16314
+ "type": "object",
16315
+ "additionalProperties": {
16316
+ "$ref": "StorageChange"
16317
+ },
16318
+ "description": "Object mapping each key that changed to its corresponding $(ref:storage.StorageChange) for that item."
16319
+ }
16320
+ ]
16321
+ }
16482
16322
  ]
16483
16323
  },
16484
16324
  {
@@ -16635,6 +16475,23 @@
16635
16475
  }
16636
16476
  ]
16637
16477
  }
16478
+ ],
16479
+ "events": [
16480
+ {
16481
+ "name": "onChanged",
16482
+ "type": "function",
16483
+ "description": "Fired when one or more items change.",
16484
+ "parameters": [
16485
+ {
16486
+ "name": "changes",
16487
+ "type": "object",
16488
+ "additionalProperties": {
16489
+ "$ref": "StorageChange"
16490
+ },
16491
+ "description": "Object mapping each key that changed to its corresponding $(ref:storage.StorageChange) for that item."
16492
+ }
16493
+ ]
16494
+ }
16638
16495
  ]
16639
16496
  }
16640
16497
  ],
@@ -18210,6 +18067,7 @@
18210
18067
  "properties": {
18211
18068
  "user_scripts": {
18212
18069
  "type": "object",
18070
+ "max_manifest_version": 2,
18213
18071
  "optional": true,
18214
18072
  "properties": {
18215
18073
  "api_script": {
@@ -18227,6 +18085,7 @@
18227
18085
  },
18228
18086
  {
18229
18087
  "namespace": "userScripts",
18088
+ "max_manifest_version": 2,
18230
18089
  "permissions": [
18231
18090
  "manifest:user_scripts"
18232
18091
  ],
@@ -18350,6 +18209,7 @@
18350
18209
  "user_scripts_content.json": [
18351
18210
  {
18352
18211
  "namespace": "userScripts",
18212
+ "max_manifest_version": 2,
18353
18213
  "permissions": [
18354
18214
  "manifest:user_scripts"
18355
18215
  ],