webext-schema 5.3.5 → 5.4.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.
package/modules/update.js CHANGED
@@ -13,7 +13,7 @@ import { createFile } from './file-util.js';
13
13
  import { CHAR, INDENT } from './constant.js';
14
14
  const DIR_CWD = process.cwd();
15
15
  const PERM_FILE = 0o644;
16
- export const ESR_VER = 115;
16
+ export const ESR_VER = 128;
17
17
 
18
18
  /**
19
19
  * fetch text
package/package.json CHANGED
@@ -28,7 +28,7 @@
28
28
  "eslint": "^8.57.0",
29
29
  "eslint-config-standard": "^17.1.0",
30
30
  "eslint-plugin-import": "^2.29.1",
31
- "eslint-plugin-jsdoc": "^48.5.2",
31
+ "eslint-plugin-jsdoc": "^48.6.0",
32
32
  "eslint-plugin-regexp": "^2.6.0",
33
33
  "eslint-plugin-unicorn": "^54.0.0",
34
34
  "mocha": "^10.6.0",
@@ -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.5"
57
+ "version": "5.4.0"
58
58
  }
@@ -721,7 +721,8 @@
721
721
  "optional": true,
722
722
  "format": "url",
723
723
  "pattern": "^(https://|http://(localhost|127\\.0\\.0\\.1|\\[::1\\])(:\\d*)?(/|$)).*$",
724
- "preprocess": "localize"
724
+ "preprocess": "localize",
725
+ "deprecated": "Unsupported on Firefox at this time."
725
726
  },
726
727
  "alternate_urls": {
727
728
  "type": "array",
@@ -13884,30 +13885,6 @@
13884
13885
  }
13885
13886
  }
13886
13887
  },
13887
- {
13888
- "id": "WebExtensionSitePermissionsManifest",
13889
- "type": "object",
13890
- "description": "Represents a WebExtension site permissions manifest.json file",
13891
- "$import": "ManifestBase",
13892
- "properties": {
13893
- "site_permissions": {
13894
- "type": "array",
13895
- "minItems": 1,
13896
- "items": {
13897
- "$ref": "SitePermission"
13898
- }
13899
- },
13900
- "install_origins": {
13901
- "type": "array",
13902
- "minItems": 1,
13903
- "maxItems": 1,
13904
- "items": {
13905
- "type": "string",
13906
- "format": "origin"
13907
- }
13908
- }
13909
- }
13910
- },
13911
13888
  {
13912
13889
  "id": "ThemeIcons",
13913
13890
  "type": "object",
@@ -14020,18 +13997,6 @@
14020
13997
  }
14021
13998
  ]
14022
13999
  },
14023
- {
14024
- "id": "SitePermission",
14025
- "choices": [
14026
- {
14027
- "type": "string",
14028
- "enum": [
14029
- "midi",
14030
- "midi-sysex"
14031
- ]
14032
- }
14033
- ]
14034
- },
14035
14000
  {
14036
14001
  "id": "HttpURL",
14037
14002
  "type": "string",
@@ -750,6 +750,7 @@
750
750
  },
751
751
  "params": {
752
752
  "optional": true,
753
+ "max_manifest_version": 2,
753
754
  "type": "array",
754
755
  "items": {
755
756
  "type": "object",
@@ -914,6 +915,12 @@
914
915
  {
915
916
  "name": "command",
916
917
  "type": "string"
918
+ },
919
+ {
920
+ "name": "tab",
921
+ "$ref": "tabs.Tab",
922
+ "optional": true,
923
+ "description": "Details of the $(ref:tabs.Tab) where the command was activated."
917
924
  }
918
925
  ]
919
926
  },
@@ -4463,6 +4470,11 @@
4463
4470
  "optional": true,
4464
4471
  "description": "Whether the tab has produced sound over the past couple of seconds (but it might not be heard if also muted). Equivalent to whether the speaker audio indicator is showing."
4465
4472
  },
4473
+ "autoDiscardable": {
4474
+ "type": "boolean",
4475
+ "optional": true,
4476
+ "description": "Whether the tab can be discarded automatically by the browser when resources are low."
4477
+ },
4466
4478
  "mutedInfo": {
4467
4479
  "$ref": "MutedInfo",
4468
4480
  "optional": true,
@@ -4764,6 +4776,7 @@
4764
4776
  "enum": [
4765
4777
  "attention",
4766
4778
  "audible",
4779
+ "autoDiscardable",
4767
4780
  "discarded",
4768
4781
  "favIconUrl",
4769
4782
  "hidden",
@@ -5095,6 +5108,11 @@
5095
5108
  "optional": true,
5096
5109
  "description": "Whether the tabs are audible."
5097
5110
  },
5111
+ "autoDiscardable": {
5112
+ "type": "boolean",
5113
+ "optional": true,
5114
+ "description": "Whether the tab can be discarded automatically by the browser when resources are low."
5115
+ },
5098
5116
  "muted": {
5099
5117
  "type": "boolean",
5100
5118
  "optional": true,
@@ -5312,6 +5330,11 @@
5312
5330
  "optional": true,
5313
5331
  "description": "Whether the tab should be active. Does not affect whether the window is focused (see $(ref:windows.update))."
5314
5332
  },
5333
+ "autoDiscardable": {
5334
+ "type": "boolean",
5335
+ "optional": true,
5336
+ "description": "Whether the tab can be discarded automatically by the browser when resources are low."
5337
+ },
5315
5338
  "highlighted": {
5316
5339
  "type": "boolean",
5317
5340
  "optional": true,
@@ -5596,9 +5619,10 @@
5596
5619
  {
5597
5620
  "name": "captureVisibleTab",
5598
5621
  "type": "function",
5599
- "description": "Captures an area of the currently active tab in the specified window. You must have $(topic:declare_permissions)[<all_urls>] permission to use this method.",
5622
+ "description": "Captures an area of the currently active tab in the specified window. You must have <all_urls> or activeTab permission to use this method.",
5600
5623
  "permissions": [
5601
- "<all_urls>"
5624
+ "<all_urls>",
5625
+ "activeTab"
5602
5626
  ],
5603
5627
  "async": "callback",
5604
5628
  "parameters": [
@@ -6058,6 +6082,11 @@
6058
6082
  "optional": true,
6059
6083
  "description": "The tab's new audible state."
6060
6084
  },
6085
+ "autoDiscardable": {
6086
+ "type": "boolean",
6087
+ "optional": true,
6088
+ "description": "The tab's new autoDiscardable state."
6089
+ },
6061
6090
  "discarded": {
6062
6091
  "type": "boolean",
6063
6092
  "optional": true,
@@ -6521,307 +6550,6 @@
6521
6550
  ]
6522
6551
  }
6523
6552
  ],
6524
- "urlbar.json": [
6525
- {
6526
- "namespace": "manifest",
6527
- "types": [
6528
- {
6529
- "$extend": "PermissionPrivileged",
6530
- "choices": [
6531
- {
6532
- "type": "string",
6533
- "enum": [
6534
- "urlbar"
6535
- ]
6536
- }
6537
- ]
6538
- }
6539
- ]
6540
- },
6541
- {
6542
- "namespace": "urlbar",
6543
- "description": "Use the <code>browser.urlbar</code> API to experiment with new features in the URLBar. Restricted to Mozilla privileged WebExtensions.",
6544
- "permissions": [
6545
- "urlbar"
6546
- ],
6547
- "types": [
6548
- {
6549
- "id": "EngagementState",
6550
- "type": "string",
6551
- "enum": [
6552
- "start",
6553
- "engagement",
6554
- "abandonment",
6555
- "discard"
6556
- ],
6557
- "description": "The state of an engagement made with the urlbar by the user. <code>start</code>: The user has started an engagement. <code>engagement</code>: The user has completed an engagement by picking a result. <code>abandonment</code>: The user has abandoned their engagement, for example by blurring the urlbar. <code>discard</code>: The engagement ended in a way that should be ignored by listeners."
6558
- },
6559
- {
6560
- "id": "Query",
6561
- "type": "object",
6562
- "description": "A query performed in the urlbar.",
6563
- "properties": {
6564
- "isPrivate": {
6565
- "type": "boolean",
6566
- "description": "Whether the query's browser context is private."
6567
- },
6568
- "maxResults": {
6569
- "type": "integer",
6570
- "description": "The maximum number of results shown to the user."
6571
- },
6572
- "searchString": {
6573
- "type": "string",
6574
- "description": "The query's search string."
6575
- },
6576
- "sources": {
6577
- "type": "array",
6578
- "description": "List of acceptable source types to return.",
6579
- "items": {
6580
- "$ref": "SourceType"
6581
- }
6582
- }
6583
- }
6584
- },
6585
- {
6586
- "id": "Result",
6587
- "type": "object",
6588
- "description": "A result of a query. Queries can have many results. Each result is created by a provider.",
6589
- "properties": {
6590
- "payload": {
6591
- "type": "object",
6592
- "description": "An object with arbitrary properties depending on the result's type."
6593
- },
6594
- "source": {
6595
- "$ref": "SourceType",
6596
- "description": "The result's source."
6597
- },
6598
- "type": {
6599
- "$ref": "ResultType",
6600
- "description": "The result's type."
6601
- },
6602
- "suggestedIndex": {
6603
- "type": "integer",
6604
- "description": "Suggest a preferred position for this result within the result set.",
6605
- "optional": true,
6606
- "default": -1
6607
- }
6608
- }
6609
- },
6610
- {
6611
- "id": "ResultType",
6612
- "type": "string",
6613
- "enum": [
6614
- "dynamic",
6615
- "remote_tab",
6616
- "search",
6617
- "tab",
6618
- "tip",
6619
- "url"
6620
- ],
6621
- "description": "Possible types of results. <code>dynamic</code>: A result whose view and payload are specified by the extension. <code>remote_tab</code>: A synced tab from another device. <code>search</code>: A search suggestion from a search engine. <code>tab</code>: An open tab in the browser. <code>tip</code>: An actionable message to help the user with their query. <code>url</code>: A URL that's not one of the other types."
6622
- },
6623
- {
6624
- "id": "SearchOptions",
6625
- "type": "object",
6626
- "description": "Options to the <code>search</code> function.",
6627
- "properties": {
6628
- "focus": {
6629
- "type": "boolean",
6630
- "optional": true,
6631
- "default": true,
6632
- "description": "Whether to focus the input field and select its contents."
6633
- }
6634
- }
6635
- },
6636
- {
6637
- "id": "SourceType",
6638
- "type": "string",
6639
- "enum": [
6640
- "bookmarks",
6641
- "history",
6642
- "local",
6643
- "network",
6644
- "search",
6645
- "tabs"
6646
- ],
6647
- "description": "Possible sources of results. <code>bookmarks</code>: The result comes from the user's bookmarks. <code>history</code>: The result comes from the user's history. <code>local</code>: The result comes from some local source not covered by another source type. <code>network</code>: The result comes from some network source not covered by another source type. <code>search</code>: The result comes from a search engine. <code>tabs</code>: The result is an open tab in the browser or a synced tab from another device."
6648
- }
6649
- ],
6650
- "properties": {
6651
- "engagementTelemetry": {
6652
- "$ref": "types.Setting",
6653
- "description": "Enables or disables the engagement telemetry."
6654
- }
6655
- },
6656
- "functions": [
6657
- {
6658
- "name": "closeView",
6659
- "type": "function",
6660
- "async": true,
6661
- "description": "Closes the urlbar view in the current window.",
6662
- "parameters": []
6663
- },
6664
- {
6665
- "name": "focus",
6666
- "type": "function",
6667
- "async": true,
6668
- "description": "Focuses the urlbar in the current window.",
6669
- "parameters": [
6670
- {
6671
- "name": "select",
6672
- "type": "boolean",
6673
- "optional": true,
6674
- "default": false,
6675
- "description": "If true, the text in the urlbar will also be selected."
6676
- }
6677
- ]
6678
- },
6679
- {
6680
- "name": "search",
6681
- "type": "function",
6682
- "async": true,
6683
- "description": "Starts a search in the urlbar in the current window.",
6684
- "parameters": [
6685
- {
6686
- "name": "searchString",
6687
- "type": "string",
6688
- "description": "The search string."
6689
- },
6690
- {
6691
- "name": "options",
6692
- "$ref": "SearchOptions",
6693
- "optional": true,
6694
- "default": {},
6695
- "description": "Options for the search."
6696
- }
6697
- ]
6698
- }
6699
- ],
6700
- "events": [
6701
- {
6702
- "name": "onBehaviorRequested",
6703
- "type": "function",
6704
- "description": "Before a query starts, this event is fired for the given provider. Its purpose is to request the provider's behavior for the query. The listener should return a behavior in response. By default, providers are inactive, so if your provider should always be inactive, you don't need to listen for this event.",
6705
- "parameters": [
6706
- {
6707
- "name": "query",
6708
- "$ref": "Query",
6709
- "description": "The query for which the behavior is requested."
6710
- }
6711
- ],
6712
- "extraParameters": [
6713
- {
6714
- "name": "providerName",
6715
- "type": "string",
6716
- "pattern": "^[a-zA-Z0-9_-]+$",
6717
- "description": "The name of the provider whose behavior the listener returns."
6718
- }
6719
- ],
6720
- "returns": {
6721
- "type": "string",
6722
- "enum": [
6723
- "active",
6724
- "inactive",
6725
- "restricting"
6726
- ],
6727
- "description": "The behavior of the provider for the query."
6728
- }
6729
- },
6730
- {
6731
- "name": "onEngagement",
6732
- "type": "function",
6733
- "description": "This event is fired when the user starts and ends an engagement with the urlbar.",
6734
- "parameters": [
6735
- {
6736
- "name": "state",
6737
- "$ref": "EngagementState",
6738
- "description": "The state of the engagement."
6739
- }
6740
- ],
6741
- "extraParameters": [
6742
- {
6743
- "name": "providerName",
6744
- "type": "string",
6745
- "pattern": "^[a-zA-Z0-9_-]+$",
6746
- "description": "The name of the provider that will listen for engagement events."
6747
- }
6748
- ]
6749
- },
6750
- {
6751
- "name": "onQueryCanceled",
6752
- "type": "function",
6753
- "description": "This event is fired for the given provider when a query is canceled. The listener should stop any ongoing fetch or creation of results and clean up its resources.",
6754
- "parameters": [
6755
- {
6756
- "name": "query",
6757
- "$ref": "Query",
6758
- "description": "The query that was canceled."
6759
- }
6760
- ],
6761
- "extraParameters": [
6762
- {
6763
- "name": "providerName",
6764
- "type": "string",
6765
- "pattern": "^[a-zA-Z0-9_-]+$",
6766
- "description": "The name of the provider that is creating results for the query."
6767
- }
6768
- ]
6769
- },
6770
- {
6771
- "name": "onResultsRequested",
6772
- "type": "function",
6773
- "description": "When a query starts, this event is fired for the given provider if the provider is active for the query and there are no other providers that are restricting. Its purpose is to request the provider's results for the query. The listener should return a list of results in response.",
6774
- "parameters": [
6775
- {
6776
- "name": "query",
6777
- "$ref": "Query",
6778
- "description": "The query for which results are requested."
6779
- }
6780
- ],
6781
- "extraParameters": [
6782
- {
6783
- "name": "providerName",
6784
- "type": "string",
6785
- "pattern": "^[a-zA-Z0-9_-]+$",
6786
- "description": "The name of the provider whose results the listener returns."
6787
- }
6788
- ],
6789
- "returns": {
6790
- "type": "array",
6791
- "items": {
6792
- "$ref": "Result"
6793
- },
6794
- "description": "The results that the provider fetched for the query."
6795
- }
6796
- },
6797
- {
6798
- "name": "onResultPicked",
6799
- "type": "function",
6800
- "description": "Typically, a provider includes a <code>url</code> property in its results' payloads. When the user picks a result with a URL, Firefox automatically loads the URL. URLs don't make sense for every result type, however. When the user picks a result without a URL, this event is fired. The provider should take an appropriate action in response. Currently the only applicable <code>ResultTypes</code> are <code>dynamic</code> and <code>tip</code>.",
6801
- "parameters": [
6802
- {
6803
- "name": "payload",
6804
- "type": "object",
6805
- "description": "The payload of the result that was picked."
6806
- },
6807
- {
6808
- "name": "elementName",
6809
- "type": "string",
6810
- "description": "If the result is a dynamic type, this is the name of the element in the result view that was picked. If the result is not a dynamic type, this is an empty string."
6811
- }
6812
- ],
6813
- "extraParameters": [
6814
- {
6815
- "name": "providerName",
6816
- "type": "string",
6817
- "pattern": "^[a-zA-Z0-9_-]+$",
6818
- "description": "The listener will be called for the results of the provider with this name."
6819
- }
6820
- ]
6821
- }
6822
- ]
6823
- }
6824
- ],
6825
6553
  "windows.json": [
6826
6554
  {
6827
6555
  "namespace": "windows",
@@ -7860,6 +7588,32 @@
7860
7588
  }
7861
7589
  ]
7862
7590
  },
7591
+ {
7592
+ "name": "getUserSettings",
7593
+ "type": "function",
7594
+ "description": "Returns the user-specified settings relating to an extension's action.",
7595
+ "async": "callback",
7596
+ "parameters": [
7597
+ {
7598
+ "type": "function",
7599
+ "name": "callback",
7600
+ "parameters": [
7601
+ {
7602
+ "name": "userSettings",
7603
+ "type": "object",
7604
+ "properties": {
7605
+ "isOnToolbar": {
7606
+ "type": "boolean",
7607
+ "optional": true,
7608
+ "description": "Whether the extension's action icon is visible on browser windows' top-level toolbar (i.e., whether the extension has been 'pinned' by the user)."
7609
+ }
7610
+ },
7611
+ "description": "The collection of user-specified settings relating to an extension's action."
7612
+ }
7613
+ ]
7614
+ }
7615
+ ]
7616
+ },
7863
7617
  {
7864
7618
  "name": "setIcon",
7865
7619
  "type": "function",
@@ -8969,13 +8723,23 @@
8969
8723
  "matchAboutBlank": {
8970
8724
  "type": "boolean",
8971
8725
  "optional": true,
8972
- "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>."
8726
+ "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. Ignored if matchOriginAsFallback is specified. By default it is <code>false</code>."
8727
+ },
8728
+ "matchOriginAsFallback": {
8729
+ "type": "boolean",
8730
+ "optional": true,
8731
+ "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>."
8973
8732
  },
8974
8733
  "runAt": {
8975
8734
  "$ref": "extensionTypes.RunAt",
8976
8735
  "optional": true,
8977
8736
  "description": "The soonest that the JavaScript or CSS will be injected into the tab. Defaults to \"document_idle\"."
8978
8737
  },
8738
+ "world": {
8739
+ "$ref": "extensionTypes.ExecutionWorld",
8740
+ "optional": true,
8741
+ "description": "The JavaScript world for a script to execute within. Defaults to \"ISOLATED\"."
8742
+ },
8979
8743
  "cookieStoreId": {
8980
8744
  "choices": [
8981
8745
  {
@@ -9180,10 +8944,38 @@
9180
8944
  }
9181
8945
  ]
9182
8946
  },
8947
+ {
8948
+ "name": "move",
8949
+ "type": "function",
8950
+ "description": "Reorder one or more contextual identities by their cookieStoreIDs to a given position.",
8951
+ "async": true,
8952
+ "parameters": [
8953
+ {
8954
+ "name": "cookieStoreIds",
8955
+ "description": "The ID or list of IDs of the contextual identity cookie stores. ",
8956
+ "choices": [
8957
+ {
8958
+ "type": "string"
8959
+ },
8960
+ {
8961
+ "type": "array",
8962
+ "items": {
8963
+ "type": "string"
8964
+ }
8965
+ }
8966
+ ]
8967
+ },
8968
+ {
8969
+ "type": "integer",
8970
+ "name": "position",
8971
+ "description": "The position the contextual identity should move to."
8972
+ }
8973
+ ]
8974
+ },
9183
8975
  {
9184
8976
  "name": "remove",
9185
8977
  "type": "function",
9186
- "description": "Deletes a contetual identity by its cookie Store ID.",
8978
+ "description": "Deletes a contextual identity by its cookie Store ID.",
9187
8979
  "async": true,
9188
8980
  "parameters": [
9189
8981
  {
@@ -10199,6 +9991,20 @@
10199
9991
  }
10200
9992
  }
10201
9993
  }
9994
+ },
9995
+ {
9996
+ "id": "GetRulesFilter",
9997
+ "type": "object",
9998
+ "properties": {
9999
+ "ruleIds": {
10000
+ "type": "array",
10001
+ "optional": true,
10002
+ "description": "If specified, only rules with matching IDs are included.",
10003
+ "items": {
10004
+ "type": "integer"
10005
+ }
10006
+ }
10007
+ }
10202
10008
  }
10203
10009
  ],
10204
10010
  "functions": [
@@ -10289,34 +10095,72 @@
10289
10095
  "name": "rulesetIds",
10290
10096
  "items": {
10291
10097
  "type": "string"
10292
- }
10098
+ }
10099
+ }
10100
+ ]
10101
+ }
10102
+ ]
10103
+ },
10104
+ {
10105
+ "name": "updateEnabledRulesets",
10106
+ "type": "function",
10107
+ "description": "Modifies the static rulesets enabled/disabled state.",
10108
+ "async": "callback",
10109
+ "parameters": [
10110
+ {
10111
+ "name": "updateRulesetOptions",
10112
+ "type": "object",
10113
+ "properties": {
10114
+ "disableRulesetIds": {
10115
+ "type": "array",
10116
+ "items": {
10117
+ "type": "string"
10118
+ },
10119
+ "optional": true,
10120
+ "default": []
10121
+ },
10122
+ "enableRulesetIds": {
10123
+ "type": "array",
10124
+ "items": {
10125
+ "type": "string"
10126
+ },
10127
+ "optional": true,
10128
+ "default": []
10293
10129
  }
10294
- ]
10130
+ }
10131
+ },
10132
+ {
10133
+ "name": "callback",
10134
+ "type": "function",
10135
+ "parameters": []
10295
10136
  }
10296
10137
  ]
10297
10138
  },
10298
10139
  {
10299
- "name": "updateEnabledRulesets",
10140
+ "name": "updateStaticRules",
10300
10141
  "type": "function",
10301
- "description": "Returns the ids for the current set of enabled static rulesets.",
10142
+ "description": "Modified individual static rules enabled/disabled state. Changes to rules belonging to a disabled ruleset will take effect when the ruleset becomes enabled.",
10302
10143
  "async": "callback",
10303
10144
  "parameters": [
10304
10145
  {
10305
- "name": "updateRulesetOptions",
10146
+ "name": "options",
10306
10147
  "type": "object",
10307
10148
  "properties": {
10308
- "disableRulesetIds": {
10149
+ "rulesetId": {
10150
+ "type": "string"
10151
+ },
10152
+ "disableRuleIds": {
10309
10153
  "type": "array",
10310
10154
  "items": {
10311
- "type": "string"
10155
+ "type": "integer"
10312
10156
  },
10313
10157
  "optional": true,
10314
10158
  "default": []
10315
10159
  },
10316
- "enableRulesetIds": {
10160
+ "enableRuleIds": {
10317
10161
  "type": "array",
10318
10162
  "items": {
10319
- "type": "string"
10163
+ "type": "integer"
10320
10164
  },
10321
10165
  "optional": true,
10322
10166
  "default": []
@@ -10348,12 +10192,48 @@
10348
10192
  }
10349
10193
  ]
10350
10194
  },
10195
+ {
10196
+ "name": "getDisabledRuleIds",
10197
+ "type": "function",
10198
+ "description": "Returns the list of individual disabled static rules from a given static ruleset id.",
10199
+ "async": "callback",
10200
+ "parameters": [
10201
+ {
10202
+ "name": "options",
10203
+ "type": "object",
10204
+ "properties": {
10205
+ "rulesetId": {
10206
+ "type": "string"
10207
+ }
10208
+ }
10209
+ },
10210
+ {
10211
+ "name": "callback",
10212
+ "type": "function",
10213
+ "parameters": [
10214
+ {
10215
+ "name": "disabledRuleIds",
10216
+ "type": "array",
10217
+ "items": {
10218
+ "type": "integer"
10219
+ }
10220
+ }
10221
+ ]
10222
+ }
10223
+ ]
10224
+ },
10351
10225
  {
10352
10226
  "name": "getDynamicRules",
10353
10227
  "type": "function",
10354
10228
  "description": "Returns the current set of dynamic rules for the extension.",
10355
10229
  "async": "callback",
10356
10230
  "parameters": [
10231
+ {
10232
+ "name": "filter",
10233
+ "$ref": "GetRulesFilter",
10234
+ "optional": true,
10235
+ "description": "An object to filter the set of dynamic rules for the extension."
10236
+ },
10357
10237
  {
10358
10238
  "name": "callback",
10359
10239
  "type": "function",
@@ -10375,6 +10255,12 @@
10375
10255
  "description": "Returns the current set of session scoped rules for the extension.",
10376
10256
  "async": "callback",
10377
10257
  "parameters": [
10258
+ {
10259
+ "name": "filter",
10260
+ "$ref": "GetRulesFilter",
10261
+ "optional": true,
10262
+ "description": "An object to filter the set of session scoped rules for the extension."
10263
+ },
10378
10264
  {
10379
10265
  "name": "callback",
10380
10266
  "type": "function",
@@ -10531,13 +10417,25 @@
10531
10417
  "type": "number",
10532
10418
  "description": "The maximum number of static Rulesets an extension can specify as part of the rule_resources manifest key."
10533
10419
  },
10420
+ "MAX_NUMBER_OF_DISABLED_STATIC_RULES": {
10421
+ "type": "number",
10422
+ "description": "The maximum number of static rules that can be disabled on each static ruleset."
10423
+ },
10534
10424
  "MAX_NUMBER_OF_ENABLED_STATIC_RULESETS": {
10535
10425
  "type": "number",
10536
10426
  "description": "The maximum number of static Rulesets an extension can enable at any one time."
10537
10427
  },
10538
10428
  "MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES": {
10539
10429
  "type": "number",
10540
- "description": "The maximum number of dynamic and session rules an extension can add. NOTE: in the Firefox we are enforcing this limit to the session and dynamic rules count separately, instead of enforcing it to the rules count for both combined as the Chrome implementation does."
10430
+ "description": "Deprecated property returning the maximum number of dynamic and session rules an extension can add, replaced by MAX_NUMBER_OF_DYNAMIC_RULES/MAX_NUMBER_OF_SESSION_RULES."
10431
+ },
10432
+ "MAX_NUMBER_OF_DYNAMIC_RULES": {
10433
+ "type": "number",
10434
+ "description": "The maximum number of dynamic session rules an extension can add."
10435
+ },
10436
+ "MAX_NUMBER_OF_SESSION_RULES": {
10437
+ "type": "number",
10438
+ "description": "The maximum number of dynamic session rules an extension can add."
10541
10439
  },
10542
10440
  "MAX_NUMBER_OF_REGEX_RULES": {
10543
10441
  "type": "number",
@@ -12267,6 +12165,15 @@
12267
12165
  ],
12268
12166
  "description": "The soonest that the JavaScript or CSS will be injected into the tab."
12269
12167
  },
12168
+ {
12169
+ "id": "ExecutionWorld",
12170
+ "type": "string",
12171
+ "enum": [
12172
+ "ISOLATED",
12173
+ "MAIN"
12174
+ ],
12175
+ "description": "The JavaScript world for a script to execute within. <code>ISOLATED</code> is the default execution environment of content scripts, <code>MAIN</code> is the web page's execution environment."
12176
+ },
12270
12177
  {
12271
12178
  "id": "CSSOrigin",
12272
12179
  "type": "string",
@@ -12528,7 +12435,10 @@
12528
12435
  "unregisteredthreads",
12529
12436
  "processcpu",
12530
12437
  "power",
12531
- "responsiveness"
12438
+ "responsiveness",
12439
+ "cpufreq",
12440
+ "bandwidth",
12441
+ "memory"
12532
12442
  ]
12533
12443
  },
12534
12444
  {
@@ -13185,12 +13095,13 @@
13185
13095
  },
13186
13096
  {
13187
13097
  "id": "ExtensionInstallType",
13188
- "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.",
13098
+ "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.",
13189
13099
  "type": "string",
13190
13100
  "enum": [
13191
13101
  "development",
13192
13102
  "normal",
13193
13103
  "sideload",
13104
+ "admin",
13194
13105
  "other"
13195
13106
  ]
13196
13107
  },
@@ -13633,10 +13544,13 @@
13633
13544
  },
13634
13545
  "incognito": {
13635
13546
  "type": "string",
13547
+ "description": "The 'split' value is not supported.",
13636
13548
  "enum": [
13637
13549
  "not_allowed",
13638
- "spanning"
13550
+ "spanning",
13551
+ "split"
13639
13552
  ],
13553
+ "postprocess": "incognitoSplitUnsupportedAndFallback",
13640
13554
  "default": "spanning",
13641
13555
  "optional": true
13642
13556
  },
@@ -13699,6 +13613,11 @@
13699
13613
  ],
13700
13614
  "optional": true
13701
13615
  },
13616
+ "options_page": {
13617
+ "$ref": "ExtensionURL",
13618
+ "optional": true,
13619
+ "description": "Alias property for options_ui.page, ignored when options_ui.page is set. When using this property the options page is always opened in a new tab."
13620
+ },
13702
13621
  "options_ui": {
13703
13622
  "type": "object",
13704
13623
  "optional": true,
@@ -13796,6 +13715,16 @@
13796
13715
  "optional": true,
13797
13716
  "default": []
13798
13717
  },
13718
+ "optional_host_permissions": {
13719
+ "min_manifest_version": 3,
13720
+ "type": "array",
13721
+ "items": {
13722
+ "$ref": "MatchPattern",
13723
+ "onError": "warn"
13724
+ },
13725
+ "optional": true,
13726
+ "default": []
13727
+ },
13799
13728
  "optional_permissions": {
13800
13729
  "type": "array",
13801
13730
  "items": {
@@ -14159,7 +14088,14 @@
14159
14088
  "strict_max_version": {
14160
14089
  "type": "string",
14161
14090
  "optional": true
14091
+ },
14092
+ "admin_install_only": {
14093
+ "type": "boolean",
14094
+ "optional": true
14162
14095
  }
14096
+ },
14097
+ "additionalProperties": {
14098
+ "$ref": "UnrecognizedProperty"
14163
14099
  }
14164
14100
  },
14165
14101
  {
@@ -14176,7 +14112,7 @@
14176
14112
  }
14177
14113
  },
14178
14114
  "additionalProperties": {
14179
- "type": "any"
14115
+ "$ref": "UnrecognizedProperty"
14180
14116
  }
14181
14117
  },
14182
14118
  {
@@ -14317,13 +14253,24 @@
14317
14253
  "match_about_blank": {
14318
14254
  "type": "boolean",
14319
14255
  "optional": true,
14320
- "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>."
14256
+ "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>."
14257
+ },
14258
+ "match_origin_as_fallback": {
14259
+ "type": "boolean",
14260
+ "optional": true,
14261
+ "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>."
14321
14262
  },
14322
14263
  "run_at": {
14323
14264
  "$ref": "extensionTypes.RunAt",
14324
14265
  "optional": true,
14325
14266
  "default": "document_idle",
14326
14267
  "description": "The soonest that the JavaScript or CSS will be injected into the tab. Defaults to \"document_idle\"."
14268
+ },
14269
+ "world": {
14270
+ "$ref": "extensionTypes.ExecutionWorld",
14271
+ "optional": true,
14272
+ "default": "ISOLATED",
14273
+ "description": "The JavaScript world for a script to execute within. Defaults to \"ISOLATED\"."
14327
14274
  }
14328
14275
  }
14329
14276
  },
@@ -15572,7 +15519,7 @@
15572
15519
  "proxyDNS": {
15573
15520
  "type": "boolean",
15574
15521
  "optional": true,
15575
- "description": "Proxy DNS when using SOCKS v5."
15522
+ "description": "Proxy DNS when using SOCKS. DNS queries get leaked to the network when set to false. True by default for SOCKS v5. False by default for SOCKS v4."
15576
15523
  },
15577
15524
  "respectBeConservative": {
15578
15525
  "type": "boolean",
@@ -15936,6 +15883,132 @@
15936
15883
  ],
15937
15884
  "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.",
15938
15885
  "types": [
15886
+ {
15887
+ "id": "ContextFilter",
15888
+ "min_manifest_version": 3,
15889
+ "type": "object",
15890
+ "description": "A filter to match against existing extension context. Matching contexts must match all specified filters.",
15891
+ "properties": {
15892
+ "contextIds": {
15893
+ "optional": true,
15894
+ "type": "array",
15895
+ "items": {
15896
+ "type": "string"
15897
+ }
15898
+ },
15899
+ "contextTypes": {
15900
+ "optional": true,
15901
+ "type": "array",
15902
+ "items": {
15903
+ "$ref": "ContextType"
15904
+ }
15905
+ },
15906
+ "documentIds": {
15907
+ "optional": true,
15908
+ "type": "array",
15909
+ "items": {
15910
+ "type": "string"
15911
+ }
15912
+ },
15913
+ "documentOrigins": {
15914
+ "optional": true,
15915
+ "type": "array",
15916
+ "items": {
15917
+ "type": "string"
15918
+ }
15919
+ },
15920
+ "documentUrls": {
15921
+ "optional": true,
15922
+ "type": "array",
15923
+ "items": {
15924
+ "type": "string"
15925
+ }
15926
+ },
15927
+ "frameIds": {
15928
+ "optional": true,
15929
+ "type": "array",
15930
+ "items": {
15931
+ "type": "integer"
15932
+ }
15933
+ },
15934
+ "tabIds": {
15935
+ "optional": true,
15936
+ "type": "array",
15937
+ "items": {
15938
+ "type": "integer"
15939
+ }
15940
+ },
15941
+ "windowIds": {
15942
+ "optional": true,
15943
+ "type": "array",
15944
+ "items": {
15945
+ "type": "integer"
15946
+ }
15947
+ },
15948
+ "incognito": {
15949
+ "optional": true,
15950
+ "type": "boolean"
15951
+ }
15952
+ }
15953
+ },
15954
+ {
15955
+ "id": "ContextType",
15956
+ "type": "string",
15957
+ "enum": [
15958
+ "BACKGROUND",
15959
+ "POPUP",
15960
+ "SIDE_PANEL",
15961
+ "TAB"
15962
+ ],
15963
+ "description": "The type of extension view."
15964
+ },
15965
+ {
15966
+ "id": "ExtensionContext",
15967
+ "type": "object",
15968
+ "description": "A context hosting extension content",
15969
+ "properties": {
15970
+ "contextId": {
15971
+ "type": "string",
15972
+ "description": "An unique identifier associated to this context"
15973
+ },
15974
+ "contextType": {
15975
+ "$ref": "ContextType",
15976
+ "description": "The type of the context"
15977
+ },
15978
+ "documentId": {
15979
+ "type": "string",
15980
+ "unsupported": true,
15981
+ "optional": true,
15982
+ "description": "An UUID for the document associated with this context, or undefined if it is not hosted in a document"
15983
+ },
15984
+ "documentOrigin": {
15985
+ "type": "string",
15986
+ "optional": true,
15987
+ "description": "The origin of the document associated with this context, or undefined if it is not hosted in a document"
15988
+ },
15989
+ "documentUrl": {
15990
+ "type": "string",
15991
+ "optional": true,
15992
+ "description": "The URL of the document associated with this context, or undefined if it is not hosted in a document"
15993
+ },
15994
+ "incognito": {
15995
+ "type": "boolean",
15996
+ "description": "Whether the context is associated with an private browsing context."
15997
+ },
15998
+ "frameId": {
15999
+ "type": "integer",
16000
+ "description": "The frame ID for this context, or -1 if it is not hosted in a frame."
16001
+ },
16002
+ "tabId": {
16003
+ "type": "integer",
16004
+ "description": "The tab ID for this context, or -1 if it is not hosted in a tab."
16005
+ },
16006
+ "windowId": {
16007
+ "type": "integer",
16008
+ "description": "The window ID for this context, or -1 if it is not hosted in a window."
16009
+ }
16010
+ }
16011
+ },
15939
16012
  {
15940
16013
  "id": "Port",
15941
16014
  "type": "object",
@@ -16131,6 +16204,24 @@
16131
16204
  "os_update",
16132
16205
  "periodic"
16133
16206
  ]
16207
+ },
16208
+ {
16209
+ "id": "OnPerformanceWarningCategory",
16210
+ "type": "string",
16211
+ "enum": [
16212
+ "content_script"
16213
+ ],
16214
+ "description": "The performance warning event category, e.g. 'content_script'."
16215
+ },
16216
+ {
16217
+ "id": "OnPerformanceWarningSeverity",
16218
+ "type": "string",
16219
+ "enum": [
16220
+ "low",
16221
+ "medium",
16222
+ "high"
16223
+ ],
16224
+ "description": "The performance warning event severity. Will be 'high' for serious and user-visible issues."
16134
16225
  }
16135
16226
  ],
16136
16227
  "properties": {
@@ -16187,6 +16278,33 @@
16187
16278
  }
16188
16279
  ]
16189
16280
  },
16281
+ {
16282
+ "name": "getContexts",
16283
+ "type": "function",
16284
+ "description": "Fetches information about active contexts associated with this extension",
16285
+ "async": "callback",
16286
+ "parameters": [
16287
+ {
16288
+ "name": "filter",
16289
+ "$ref": "ContextFilter",
16290
+ "description": "A filter to find matching context."
16291
+ },
16292
+ {
16293
+ "type": "function",
16294
+ "name": "callback",
16295
+ "parameters": [
16296
+ {
16297
+ "name": "contexts",
16298
+ "type": "array",
16299
+ "items": {
16300
+ "$ref": "ExtensionContext"
16301
+ },
16302
+ "description": "The matching contexts, if any."
16303
+ }
16304
+ ]
16305
+ }
16306
+ ]
16307
+ },
16190
16308
  {
16191
16309
  "name": "openOptionsPage",
16192
16310
  "type": "function",
@@ -16263,14 +16381,14 @@
16263
16381
  {
16264
16382
  "name": "setUninstallURL",
16265
16383
  "type": "function",
16266
- "description": "Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and implement surveys. Maximum 255 characters.",
16384
+ "description": "Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and implement surveys. Maximum 1023 characters.",
16267
16385
  "async": "callback",
16268
16386
  "parameters": [
16269
16387
  {
16270
16388
  "type": "string",
16271
16389
  "name": "url",
16272
16390
  "optional": true,
16273
- "maxLength": 255,
16391
+ "maxLength": 1023,
16274
16392
  "description": "URL to be opened after the extension is uninstalled. This URL must have an http: or https: scheme. Set an empty string to not open a new tab upon uninstallation."
16275
16393
  },
16276
16394
  {
@@ -16708,6 +16826,36 @@
16708
16826
  "description": "The reason that the event is being dispatched."
16709
16827
  }
16710
16828
  ]
16829
+ },
16830
+ {
16831
+ "name": "onPerformanceWarning",
16832
+ "type": "function",
16833
+ "description": "Fired when a runtime performance issue is detected with the extension. Observe this event to be proactively notified of runtime performance problems with the extension.",
16834
+ "parameters": [
16835
+ {
16836
+ "type": "object",
16837
+ "name": "details",
16838
+ "properties": {
16839
+ "category": {
16840
+ "$ref": "OnPerformanceWarningCategory",
16841
+ "description": "The performance warning event category, e.g. 'content_script'."
16842
+ },
16843
+ "severity": {
16844
+ "$ref": "OnPerformanceWarningSeverity",
16845
+ "description": "The performance warning event severity, e.g. 'high'."
16846
+ },
16847
+ "tabId": {
16848
+ "type": "integer",
16849
+ "optional": true,
16850
+ "description": "The $(ref:tabs.Tab) that the performance warning relates to, if any."
16851
+ },
16852
+ "description": {
16853
+ "type": "string",
16854
+ "description": "An explanation of what the warning means, and hopefully how to address it."
16855
+ }
16856
+ }
16857
+ }
16858
+ ]
16711
16859
  }
16712
16860
  ]
16713
16861
  }
@@ -16874,9 +17022,10 @@
16874
17022
  "id": "ExecutionWorld",
16875
17023
  "type": "string",
16876
17024
  "enum": [
16877
- "ISOLATED"
17025
+ "ISOLATED",
17026
+ "MAIN"
16878
17027
  ],
16879
- "description": "The JavaScript world for a script to execute within. We currently only support the <code>'ISOLATED'</code> world."
17028
+ "description": "The JavaScript world for a script to execute within. <code>ISOLATED</code> is the default execution environment of content scripts, <code>MAIN</code> is the web page's execution environment."
16880
17029
  },
16881
17030
  {
16882
17031
  "id": "RegisteredContentScript",
@@ -16915,11 +17064,21 @@
16915
17064
  "type": "string"
16916
17065
  }
16917
17066
  },
17067
+ "matchOriginAsFallback": {
17068
+ "type": "boolean",
17069
+ "optional": true,
17070
+ "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>."
17071
+ },
16918
17072
  "runAt": {
16919
17073
  "$ref": "extensionTypes.RunAt",
16920
17074
  "optional": true,
16921
17075
  "description": "Specifies when JavaScript files are injected into the web page. The preferred and default value is <code>document_idle</code>."
16922
17076
  },
17077
+ "world": {
17078
+ "$ref": "ExecutionWorld",
17079
+ "optional": true,
17080
+ "description": "The JavaScript world for a script to execute within. Defaults to \"ISOLATED\"."
17081
+ },
16923
17082
  "persistAcrossSessions": {
16924
17083
  "type": "boolean",
16925
17084
  "optional": true,
@@ -19543,12 +19702,10 @@
19543
19702
  "description": "0 indicates the navigation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab."
19544
19703
  },
19545
19704
  "transitionType": {
19546
- "unsupported": true,
19547
19705
  "$ref": "TransitionType",
19548
19706
  "description": "Cause of the navigation."
19549
19707
  },
19550
19708
  "transitionQualifiers": {
19551
- "unsupported": true,
19552
19709
  "type": "array",
19553
19710
  "description": "A list of transition qualifiers.",
19554
19711
  "items": {
@@ -19770,12 +19927,10 @@
19770
19927
  "description": "0 indicates the navigation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab."
19771
19928
  },
19772
19929
  "transitionType": {
19773
- "unsupported": true,
19774
19930
  "$ref": "TransitionType",
19775
19931
  "description": "Cause of the navigation."
19776
19932
  },
19777
19933
  "transitionQualifiers": {
19778
- "unsupported": true,
19779
19934
  "type": "array",
19780
19935
  "description": "A list of transition qualifiers.",
19781
19936
  "items": {
@@ -19849,12 +20004,10 @@
19849
20004
  "description": "0 indicates the navigation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique within a tab."
19850
20005
  },
19851
20006
  "transitionType": {
19852
- "unsupported": true,
19853
20007
  "$ref": "TransitionType",
19854
20008
  "description": "Cause of the navigation."
19855
20009
  },
19856
20010
  "transitionQualifiers": {
19857
- "unsupported": true,
19858
20011
  "type": "array",
19859
20012
  "description": "A list of transition qualifiers.",
19860
20013
  "items": {
@@ -19891,6 +20044,7 @@
19891
20044
  "type": "string",
19892
20045
  "enum": [
19893
20046
  "webRequest",
20047
+ "webRequestAuthProvider",
19894
20048
  "webRequestBlocking",
19895
20049
  "webRequestFilterResponse",
19896
20050
  "webRequestFilterResponse.serviceWorkerScript"
@@ -19981,7 +20135,7 @@
19981
20135
  "blocking",
19982
20136
  "asyncBlocking"
19983
20137
  ],
19984
- "postprocess": "webRequestBlockingPermissionRequired"
20138
+ "postprocess": "webRequestBlockingOrAuthProviderPermissionRequired"
19985
20139
  },
19986
20140
  {
19987
20141
  "id": "OnResponseStartedOptions",
@@ -20988,7 +21142,7 @@
20988
21142
  {
20989
21143
  "type": "function",
20990
21144
  "optional": true,
20991
- "name": "callback",
21145
+ "name": "asyncCallback",
20992
21146
  "parameters": [
20993
21147
  {
20994
21148
  "name": "response",
@@ -21007,6 +21161,7 @@
21007
21161
  "type": "array",
21008
21162
  "optional": true,
21009
21163
  "name": "extraInfoSpec",
21164
+ "postprocess": "mutuallyExclusiveBlockingOrAsyncBlocking",
21010
21165
  "description": "Array of extra information that should be passed to the listener function.",
21011
21166
  "items": {
21012
21167
  "$ref": "OnAuthRequiredOptions"
@@ -1,4 +1,4 @@
1
- export const ESR_VER: 115;
1
+ export const ESR_VER: 128;
2
2
  export function fetchText(url: string): Promise<string>;
3
3
  export function getChannelUrl(channel: string): string;
4
4
  export function getSchemaData(file: string, baseUrl: string): Promise<object>;