webext-schema 5.3.1 → 5.3.2

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
@@ -17,11 +17,11 @@
17
17
  "commander": "^12.0.0",
18
18
  "decamelize": "^6.0.0",
19
19
  "json5": "^2.2.3",
20
- "sinon": "^17.0.2"
20
+ "sinon": "^18.0.0"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/firefox-webext-browser": "^120.0.3",
24
- "@types/node": "^20.12.11",
24
+ "@types/node": "^20.12.12",
25
25
  "@types/sinon": "^17.0.3",
26
26
  "c8": "^9.1.0",
27
27
  "chai": "^5.1.1",
@@ -54,5 +54,5 @@
54
54
  "update-mail": "node index update --channel=mail -i",
55
55
  "update-release": "node index update --channel=release -i"
56
56
  },
57
- "version": "5.3.1"
57
+ "version": "5.3.2"
58
58
  }
@@ -9981,6 +9981,20 @@
9981
9981
  }
9982
9982
  }
9983
9983
  }
9984
+ },
9985
+ {
9986
+ "id": "GetRulesFilter",
9987
+ "type": "object",
9988
+ "properties": {
9989
+ "ruleIds": {
9990
+ "type": "array",
9991
+ "optional": true,
9992
+ "description": "If specified, only rules with matching IDs are included.",
9993
+ "items": {
9994
+ "type": "integer"
9995
+ }
9996
+ }
9997
+ }
9984
9998
  }
9985
9999
  ],
9986
10000
  "functions": [
@@ -10136,6 +10150,12 @@
10136
10150
  "description": "Returns the current set of dynamic rules for the extension.",
10137
10151
  "async": "callback",
10138
10152
  "parameters": [
10153
+ {
10154
+ "name": "filter",
10155
+ "$ref": "GetRulesFilter",
10156
+ "optional": true,
10157
+ "description": "An object to filter the set of dynamic rules for the extension."
10158
+ },
10139
10159
  {
10140
10160
  "name": "callback",
10141
10161
  "type": "function",
@@ -10157,6 +10177,12 @@
10157
10177
  "description": "Returns the current set of session scoped rules for the extension.",
10158
10178
  "async": "callback",
10159
10179
  "parameters": [
10180
+ {
10181
+ "name": "filter",
10182
+ "$ref": "GetRulesFilter",
10183
+ "optional": true,
10184
+ "description": "An object to filter the set of session scoped rules for the extension."
10185
+ },
10160
10186
  {
10161
10187
  "name": "callback",
10162
10188
  "type": "function",
@@ -12312,7 +12338,8 @@
12312
12338
  "power",
12313
12339
  "responsiveness",
12314
12340
  "cpufreq",
12315
- "bandwidth"
12341
+ "bandwidth",
12342
+ "memory"
12316
12343
  ]
12317
12344
  },
12318
12345
  {
@@ -12969,12 +12996,13 @@
12969
12996
  },
12970
12997
  {
12971
12998
  "id": "ExtensionInstallType",
12972
- "description": "How the extension was installed. One of<br><var>development</var>: The extension was loaded unpacked in developer mode,<br><var>normal</var>: The extension was installed normally via an .xpi file,<br><var>sideload</var>: The extension was installed by other software on the machine,<br><var>other</var>: The extension was installed by other means.",
12999
+ "description": "How the extension was installed. One of<br><var>development</var>: The extension was loaded unpacked in developer mode,<br><var>normal</var>: The extension was installed normally via an .xpi file,<br><var>sideload</var>: The extension was installed by other software on the machine,<br><var>admin</var>: The extension was installed by policy,<br><var>other</var>: The extension was installed by other means.",
12973
13000
  "type": "string",
12974
13001
  "enum": [
12975
13002
  "development",
12976
13003
  "normal",
12977
13004
  "sideload",
13005
+ "admin",
12978
13006
  "other"
12979
13007
  ]
12980
13008
  },
@@ -13417,10 +13445,13 @@
13417
13445
  },
13418
13446
  "incognito": {
13419
13447
  "type": "string",
13448
+ "description": "The 'split' value is not supported.",
13420
13449
  "enum": [
13421
13450
  "not_allowed",
13422
- "spanning"
13451
+ "spanning",
13452
+ "split"
13423
13453
  ],
13454
+ "postprocess": "incognitoSplitUnsupportedAndFallback",
13424
13455
  "default": "spanning",
13425
13456
  "optional": true
13426
13457
  },
@@ -15725,6 +15756,132 @@
15725
15756
  ],
15726
15757
  "description": "Use the <code>browser.runtime</code> API to retrieve the background page, return details about the manifest, and listen for and respond to events in the app or extension lifecycle. You can also use this API to convert the relative path of URLs to fully-qualified URLs.",
15727
15758
  "types": [
15759
+ {
15760
+ "id": "ContextFilter",
15761
+ "min_manifest_version": 3,
15762
+ "type": "object",
15763
+ "description": "A filter to match against existing extension context. Matching contexts must match all specified filters.",
15764
+ "properties": {
15765
+ "contextIds": {
15766
+ "optional": true,
15767
+ "type": "array",
15768
+ "items": {
15769
+ "type": "string"
15770
+ }
15771
+ },
15772
+ "contextTypes": {
15773
+ "optional": true,
15774
+ "type": "array",
15775
+ "items": {
15776
+ "$ref": "ContextType"
15777
+ }
15778
+ },
15779
+ "documentIds": {
15780
+ "optional": true,
15781
+ "type": "array",
15782
+ "items": {
15783
+ "type": "string"
15784
+ }
15785
+ },
15786
+ "documentOrigins": {
15787
+ "optional": true,
15788
+ "type": "array",
15789
+ "items": {
15790
+ "type": "string"
15791
+ }
15792
+ },
15793
+ "documentUrls": {
15794
+ "optional": true,
15795
+ "type": "array",
15796
+ "items": {
15797
+ "type": "string"
15798
+ }
15799
+ },
15800
+ "frameIds": {
15801
+ "optional": true,
15802
+ "type": "array",
15803
+ "items": {
15804
+ "type": "integer"
15805
+ }
15806
+ },
15807
+ "tabIds": {
15808
+ "optional": true,
15809
+ "type": "array",
15810
+ "items": {
15811
+ "type": "integer"
15812
+ }
15813
+ },
15814
+ "windowIds": {
15815
+ "optional": true,
15816
+ "type": "array",
15817
+ "items": {
15818
+ "type": "integer"
15819
+ }
15820
+ },
15821
+ "incognito": {
15822
+ "optional": true,
15823
+ "type": "boolean"
15824
+ }
15825
+ }
15826
+ },
15827
+ {
15828
+ "id": "ContextType",
15829
+ "type": "string",
15830
+ "enum": [
15831
+ "BACKGROUND",
15832
+ "POPUP",
15833
+ "SIDE_PANEL",
15834
+ "TAB"
15835
+ ],
15836
+ "description": "The type of extension view."
15837
+ },
15838
+ {
15839
+ "id": "ExtensionContext",
15840
+ "type": "object",
15841
+ "description": "A context hosting extension content",
15842
+ "properties": {
15843
+ "contextId": {
15844
+ "type": "string",
15845
+ "description": "An unique identifier associated to this context"
15846
+ },
15847
+ "contextType": {
15848
+ "$ref": "ContextType",
15849
+ "description": "The type of the context"
15850
+ },
15851
+ "documentId": {
15852
+ "type": "string",
15853
+ "unsupported": true,
15854
+ "optional": true,
15855
+ "description": "An UUID for the document associated with this context, or undefined if it is not hosted in a document"
15856
+ },
15857
+ "documentOrigin": {
15858
+ "type": "string",
15859
+ "optional": true,
15860
+ "description": "The origin of the document associated with this context, or undefined if it is not hosted in a document"
15861
+ },
15862
+ "documentUrl": {
15863
+ "type": "string",
15864
+ "optional": true,
15865
+ "description": "The URL of the document associated with this context, or undefined if it is not hosted in a document"
15866
+ },
15867
+ "incognito": {
15868
+ "type": "boolean",
15869
+ "description": "Whether the context is associated with an private browsing context."
15870
+ },
15871
+ "frameId": {
15872
+ "type": "integer",
15873
+ "description": "The frame ID for this context, or -1 if it is not hosted in a frame."
15874
+ },
15875
+ "tabId": {
15876
+ "type": "integer",
15877
+ "description": "The tab ID for this context, or -1 if it is not hosted in a tab."
15878
+ },
15879
+ "windowId": {
15880
+ "type": "integer",
15881
+ "description": "The window ID for this context, or -1 if it is not hosted in a window."
15882
+ }
15883
+ }
15884
+ },
15728
15885
  {
15729
15886
  "id": "Port",
15730
15887
  "type": "object",
@@ -15994,6 +16151,33 @@
15994
16151
  }
15995
16152
  ]
15996
16153
  },
16154
+ {
16155
+ "name": "getContexts",
16156
+ "type": "function",
16157
+ "description": "Fetches information about active contexts associated with this extension",
16158
+ "async": "callback",
16159
+ "parameters": [
16160
+ {
16161
+ "name": "filter",
16162
+ "$ref": "ContextFilter",
16163
+ "description": "A filter to find matching context."
16164
+ },
16165
+ {
16166
+ "type": "function",
16167
+ "name": "callback",
16168
+ "parameters": [
16169
+ {
16170
+ "name": "contexts",
16171
+ "type": "array",
16172
+ "items": {
16173
+ "$ref": "ExtensionContext"
16174
+ },
16175
+ "description": "The matching contexts, if any."
16176
+ }
16177
+ ]
16178
+ }
16179
+ ]
16180
+ },
15997
16181
  {
15998
16182
  "name": "openOptionsPage",
15999
16183
  "type": "function",
@@ -14137,7 +14137,12 @@
14137
14137
  "match_about_blank": {
14138
14138
  "type": "boolean",
14139
14139
  "optional": true,
14140
- "description": "If matchAboutBlank is true, then the code is also injected in about:blank and about:srcdoc frames if your extension has access to its parent document. Code cannot be inserted in top-level about:-frames. By default it is <code>false</code>."
14140
+ "description": "If match_about_blank is true, then the code is also injected in about:blank and about:srcdoc frames if your extension has access to its parent document. Ignored if match_origin_as_fallback is specified. By default it is <code>false</code>."
14141
+ },
14142
+ "match_origin_as_fallback": {
14143
+ "type": "boolean",
14144
+ "optional": true,
14145
+ "description": "If match_origin_as_fallback is true, then the code is also injected in about:, data:, blob: when their origin matches the pattern in 'matches', even if the actual document origin is opaque (due to the use of CSP sandbox or iframe sandbox). Match patterns in 'matches' must specify a wildcard path glob. By default it is <code>false</code>."
14141
14146
  },
14142
14147
  "run_at": {
14143
14148
  "$ref": "extensionTypes.RunAt",
@@ -16936,6 +16941,11 @@
16936
16941
  "type": "string"
16937
16942
  }
16938
16943
  },
16944
+ "matchOriginAsFallback": {
16945
+ "type": "boolean",
16946
+ "optional": true,
16947
+ "description": "If matchOriginAsFallback is true, then the code is also injected in about:, data:, blob: when their origin matches the pattern in 'matches', even if the actual document origin is opaque (due to the use of CSP sandbox or iframe sandbox). Match patterns in 'matches' must specify a wildcard path glob. By default it is <code>false</code>."
16948
+ },
16939
16949
  "runAt": {
16940
16950
  "$ref": "extensionTypes.RunAt",
16941
16951
  "optional": true,
@@ -21004,7 +21014,7 @@
21004
21014
  {
21005
21015
  "type": "function",
21006
21016
  "optional": true,
21007
- "name": "callback",
21017
+ "name": "asyncCallback",
21008
21018
  "parameters": [
21009
21019
  {
21010
21020
  "name": "response",
@@ -21023,6 +21033,7 @@
21023
21033
  "type": "array",
21024
21034
  "optional": true,
21025
21035
  "name": "extraInfoSpec",
21036
+ "postprocess": "mutuallyExclusiveBlockingOrAsyncBlocking",
21026
21037
  "description": "Array of extra information that should be passed to the listener function.",
21027
21038
  "items": {
21028
21039
  "$ref": "OnAuthRequiredOptions"
@@ -4449,6 +4449,12 @@
4449
4449
  "description": "Enable browser styles. See the `MDN documentation on browser styles <|link-mdn-browser-styles|>`__ for more information.",
4450
4450
  "default": false
4451
4451
  },
4452
+ "default_area": {
4453
+ "type": "string",
4454
+ "optional": true,
4455
+ "description": "Defines the location the action button will appear. Deprecated and ignored. Replaced by ``allowed_spaces``",
4456
+ "deprecated": "Unsupported on Thunderbird."
4457
+ },
4452
4458
  "default_windows": {
4453
4459
  "description": "Defines the windows, the action button should appear in. Defaults to showing it only in the <value>normal</value> Thunderbird window, but can also be shown in the <value>messageDisplay</value> window.",
4454
4460
  "type": "array",
@@ -5355,14 +5361,14 @@
5355
5361
  "optional": true,
5356
5362
  "format": "url",
5357
5363
  "preprocess": "localize",
5358
- "deprecated": "Unsupported on Thunderbird at this time."
5364
+ "deprecated": "Unsupported on Thunderbird."
5359
5365
  },
5360
5366
  "image_url": {
5361
5367
  "type": "string",
5362
5368
  "optional": true,
5363
5369
  "format": "url",
5364
5370
  "preprocess": "localize",
5365
- "deprecated": "Unsupported on Thunderbird at this time."
5371
+ "deprecated": "Unsupported on Thunderbird."
5366
5372
  },
5367
5373
  "search_url_get_params": {
5368
5374
  "type": "string",
@@ -5392,13 +5398,13 @@
5392
5398
  "type": "string",
5393
5399
  "optional": true,
5394
5400
  "preprocess": "localize",
5395
- "deprecated": "Unsupported on Thunderbird at this time."
5401
+ "deprecated": "Unsupported on Thunderbird."
5396
5402
  },
5397
5403
  "image_url_post_params": {
5398
5404
  "type": "string",
5399
5405
  "optional": true,
5400
5406
  "preprocess": "localize",
5401
- "deprecated": "Unsupported on Thunderbird at this time."
5407
+ "deprecated": "Unsupported on Thunderbird."
5402
5408
  },
5403
5409
  "search_form": {
5404
5410
  "type": "string",
@@ -5415,7 +5421,7 @@
5415
5421
  "preprocess": "localize"
5416
5422
  },
5417
5423
  "optional": true,
5418
- "deprecated": "Unsupported on Thunderbird at this time."
5424
+ "deprecated": "Unsupported on Thunderbird."
5419
5425
  },
5420
5426
  "prepopulated_id": {
5421
5427
  "type": "integer",
@@ -7818,16 +7824,17 @@
7818
7824
  "permissions": [
7819
7825
  "compose"
7820
7826
  ],
7827
+ "max_manifest_version": 2,
7821
7828
  "types": [
7822
7829
  {
7823
7830
  "id": "RegisteredComposeScriptOptions",
7824
7831
  "type": "object",
7825
- "description": "Details of a compose script registered programmatically",
7832
+ "description": "Details of a compose script registered programmatically.",
7826
7833
  "properties": {
7827
7834
  "css": {
7828
7835
  "type": "array",
7829
7836
  "optional": true,
7830
- "description": "The list of CSS files to inject",
7837
+ "description": "The list of CSS files to inject.",
7831
7838
  "items": {
7832
7839
  "$ref": "extensionTypes.ExtensionFileOrCode"
7833
7840
  }
@@ -7835,7 +7842,7 @@
7835
7842
  "js": {
7836
7843
  "type": "array",
7837
7844
  "optional": true,
7838
- "description": "The list of JavaScript files to inject",
7845
+ "description": "The list of JavaScript files to inject.",
7839
7846
  "items": {
7840
7847
  "$ref": "extensionTypes.ExtensionFileOrCode"
7841
7848
  }
@@ -7845,12 +7852,12 @@
7845
7852
  {
7846
7853
  "id": "RegisteredComposeScript",
7847
7854
  "type": "object",
7848
- "description": "An object that represents a compose script registered programmatically",
7855
+ "description": "An object that represents a compose script registered programmatically.",
7849
7856
  "functions": [
7850
7857
  {
7851
7858
  "name": "unregister",
7852
7859
  "type": "function",
7853
- "description": "Unregister a compose script registered programmatically",
7860
+ "description": "Unregister a compose script registered programmatically.",
7854
7861
  "async": true,
7855
7862
  "parameters": []
7856
7863
  }
@@ -7861,7 +7868,7 @@
7861
7868
  {
7862
7869
  "name": "register",
7863
7870
  "type": "function",
7864
- "description": "Register a compose script programmatically",
7871
+ "description": "Register a compose script programmatically. **Note:** Registered scripts will only be applied to newly opened message composer tabs. To apply the script to already open message composer tab, manually inject your script by calling :ref:`tabs.executeScript` for each of the open <value>messageCompose</value> tabs.",
7865
7872
  "async": true,
7866
7873
  "parameters": [
7867
7874
  {
@@ -7877,6 +7884,7 @@
7877
7884
  "permissions": [
7878
7885
  "messagesModify"
7879
7886
  ],
7887
+ "max_manifest_version": 2,
7880
7888
  "types": [
7881
7889
  {
7882
7890
  "id": "RegisteredMessageDisplayScriptOptions",
@@ -13583,8 +13591,7 @@
13583
13591
  {
13584
13592
  "type": "string",
13585
13593
  "enum": [
13586
- "tabs",
13587
- "tabHide"
13594
+ "tabs"
13588
13595
  ]
13589
13596
  }
13590
13597
  ]
@@ -14294,6 +14301,7 @@
14294
14301
  {
14295
14302
  "name": "executeScript",
14296
14303
  "type": "function",
14304
+ "max_manifest_version": 2,
14297
14305
  "description": "Injects JavaScript code into a page. For details, see the `programmatic injection <|link-content-scripts|>`__ section of the content scripts doc.",
14298
14306
  "async": "callback",
14299
14307
  "parameters": [
@@ -14331,6 +14339,7 @@
14331
14339
  {
14332
14340
  "name": "insertCSS",
14333
14341
  "type": "function",
14342
+ "max_manifest_version": 2,
14334
14343
  "description": "Injects CSS into a page. For details, see the `programmatic injection <|link-content-scripts|>`__ section of the content scripts doc.",
14335
14344
  "async": "callback",
14336
14345
  "parameters": [
@@ -14358,6 +14367,7 @@
14358
14367
  {
14359
14368
  "name": "removeCSS",
14360
14369
  "type": "function",
14370
+ "max_manifest_version": 2,
14361
14371
  "description": "Removes injected CSS from a page. For details, see the `programmatic injection <|link-content-scripts|>`__ section of the content scripts doc.",
14362
14372
  "async": "callback",
14363
14373
  "parameters": [