chrome-types 0.1.35 → 0.1.39
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/index.d.ts +189 -64
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -80,7 +80,7 @@ declare namespace browserAction {
|
|
|
80
80
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
// Generated on
|
|
83
|
+
// Generated on Wed Sep 15 2021 22:23:37 GMT+0000 (Coordinated Universal Time)
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
declare namespace chrome {
|
|
@@ -925,7 +925,7 @@ declare namespace chrome {
|
|
|
925
925
|
/**
|
|
926
926
|
* A text boundary associated with an {@link automation.AutomationIntent}.
|
|
927
927
|
*/
|
|
928
|
-
export type IntentTextBoundaryType = "character" | "
|
|
928
|
+
export type IntentTextBoundaryType = "character" | "formatEnd" | "formatStart" | "formatStartOrEnd" | "lineEnd" | "lineStart" | "lineStartOrEnd" | "object" | "pageEnd" | "pageStart" | "pageStartOrEnd" | "paragraphEnd" | "paragraphStart" | "paragraphStartSkippingEmptyParagraphs" | "paragraphStartOrEnd" | "sentenceEnd" | "sentenceStart" | "sentenceStartOrEnd" | "webPage" | "wordEnd" | "wordStart" | "wordStartOrEnd";
|
|
929
929
|
|
|
930
930
|
/**
|
|
931
931
|
* A move direction associated with an {@link automation.AutomationIntent}.
|
|
@@ -1200,10 +1200,20 @@ declare namespace chrome {
|
|
|
1200
1200
|
|
|
1201
1201
|
moveToPreviousLineEndPosition(): void;
|
|
1202
1202
|
|
|
1203
|
+
/**
|
|
1204
|
+
* @chrome-unknown-version
|
|
1205
|
+
*/
|
|
1206
|
+
moveToNextFormatStartPosition(): void;
|
|
1207
|
+
|
|
1203
1208
|
moveToPreviousFormatStartPosition(): void;
|
|
1204
1209
|
|
|
1205
1210
|
moveToNextFormatEndPosition(): void;
|
|
1206
1211
|
|
|
1212
|
+
/**
|
|
1213
|
+
* @chrome-unknown-version
|
|
1214
|
+
*/
|
|
1215
|
+
moveToPreviousFormatEndPosition(): void;
|
|
1216
|
+
|
|
1207
1217
|
moveToNextParagraphStartPosition(): void;
|
|
1208
1218
|
|
|
1209
1219
|
moveToPreviousParagraphStartPosition(): void;
|
|
@@ -3653,6 +3663,20 @@ declare namespace chrome {
|
|
|
3653
3663
|
|
|
3654
3664
|
export interface ContentSetting<T> {
|
|
3655
3665
|
|
|
3666
|
+
/**
|
|
3667
|
+
* Clear all content setting rules set by this extension.
|
|
3668
|
+
*
|
|
3669
|
+
* @param details
|
|
3670
|
+
*/
|
|
3671
|
+
clear(
|
|
3672
|
+
details: {
|
|
3673
|
+
/**
|
|
3674
|
+
* Where to clear the setting (default: regular).
|
|
3675
|
+
*/
|
|
3676
|
+
scope?: Scope,
|
|
3677
|
+
},
|
|
3678
|
+
): Promise<{}>;
|
|
3679
|
+
|
|
3656
3680
|
/**
|
|
3657
3681
|
* Clear all content setting rules set by this extension.
|
|
3658
3682
|
*
|
|
@@ -3669,6 +3693,42 @@ declare namespace chrome {
|
|
|
3669
3693
|
callback?: () => void,
|
|
3670
3694
|
): void;
|
|
3671
3695
|
|
|
3696
|
+
/**
|
|
3697
|
+
* Gets the current content setting for a given pair of URLs.
|
|
3698
|
+
*
|
|
3699
|
+
* @param details
|
|
3700
|
+
*/
|
|
3701
|
+
get(
|
|
3702
|
+
details: {
|
|
3703
|
+
/**
|
|
3704
|
+
* The primary URL for which the content setting should be retrieved. Note that the meaning of a primary URL depends on the content type.
|
|
3705
|
+
*/
|
|
3706
|
+
primaryUrl: string,
|
|
3707
|
+
|
|
3708
|
+
/**
|
|
3709
|
+
* The secondary URL for which the content setting should be retrieved. Defaults to the primary URL. Note that the meaning of a secondary URL depends on the content type, and not all content types use secondary URLs.
|
|
3710
|
+
*/
|
|
3711
|
+
secondaryUrl?: string,
|
|
3712
|
+
|
|
3713
|
+
/**
|
|
3714
|
+
* A more specific identifier of the type of content for which the settings should be retrieved.
|
|
3715
|
+
*/
|
|
3716
|
+
resourceIdentifier?: ResourceIdentifier,
|
|
3717
|
+
|
|
3718
|
+
/**
|
|
3719
|
+
* Whether to check the content settings for an incognito session. (default false)
|
|
3720
|
+
*/
|
|
3721
|
+
incognito?: boolean,
|
|
3722
|
+
},
|
|
3723
|
+
): Promise<{
|
|
3724
|
+
details: {
|
|
3725
|
+
/**
|
|
3726
|
+
* The content setting. See the description of the individual ContentSetting objects for the possible values.
|
|
3727
|
+
*/
|
|
3728
|
+
setting: T,
|
|
3729
|
+
},
|
|
3730
|
+
}>;
|
|
3731
|
+
|
|
3672
3732
|
/**
|
|
3673
3733
|
* Gets the current content setting for a given pair of URLs.
|
|
3674
3734
|
*
|
|
@@ -3707,6 +3767,40 @@ declare namespace chrome {
|
|
|
3707
3767
|
) => void,
|
|
3708
3768
|
): void;
|
|
3709
3769
|
|
|
3770
|
+
/**
|
|
3771
|
+
* Applies a new content setting rule.
|
|
3772
|
+
*
|
|
3773
|
+
* @param details
|
|
3774
|
+
*/
|
|
3775
|
+
set(
|
|
3776
|
+
details: {
|
|
3777
|
+
/**
|
|
3778
|
+
* The pattern for the primary URL. For details on the format of a pattern, see [Content Setting Patterns](https://developer.chrome.com/docs/extensions/reference/contentSettings/#patterns).
|
|
3779
|
+
*/
|
|
3780
|
+
primaryPattern: string,
|
|
3781
|
+
|
|
3782
|
+
/**
|
|
3783
|
+
* The pattern for the secondary URL. Defaults to matching all URLs. For details on the format of a pattern, see [Content Setting Patterns](https://developer.chrome.com/docs/extensions/reference/contentSettings/#patterns).
|
|
3784
|
+
*/
|
|
3785
|
+
secondaryPattern?: string,
|
|
3786
|
+
|
|
3787
|
+
/**
|
|
3788
|
+
* The resource identifier for the content type.
|
|
3789
|
+
*/
|
|
3790
|
+
resourceIdentifier?: ResourceIdentifier,
|
|
3791
|
+
|
|
3792
|
+
/**
|
|
3793
|
+
* The setting applied by this rule. See the description of the individual ContentSetting objects for the possible values.
|
|
3794
|
+
*/
|
|
3795
|
+
setting: T,
|
|
3796
|
+
|
|
3797
|
+
/**
|
|
3798
|
+
* Where to set the setting (default: regular).
|
|
3799
|
+
*/
|
|
3800
|
+
scope?: Scope,
|
|
3801
|
+
},
|
|
3802
|
+
): Promise<{}>;
|
|
3803
|
+
|
|
3710
3804
|
/**
|
|
3711
3805
|
* Applies a new content setting rule.
|
|
3712
3806
|
*
|
|
@@ -3743,6 +3837,13 @@ declare namespace chrome {
|
|
|
3743
3837
|
callback?: () => void,
|
|
3744
3838
|
): void;
|
|
3745
3839
|
|
|
3840
|
+
getResourceIdentifiers(): Promise<{
|
|
3841
|
+
/**
|
|
3842
|
+
* A list of resource identifiers for this content type, or undefined if this content type does not use resource identifiers.
|
|
3843
|
+
*/
|
|
3844
|
+
resourceIdentifiers?: ResourceIdentifier[],
|
|
3845
|
+
}>;
|
|
3846
|
+
|
|
3746
3847
|
/**
|
|
3747
3848
|
* @param callback
|
|
3748
3849
|
*/
|
|
@@ -4846,21 +4947,19 @@ declare namespace chrome {
|
|
|
4846
4947
|
* The `chrome.declarativeNetRequest` API is used to block or modify network requests by specifying declarative rules. This lets extensions modify network requests without intercepting them and viewing their content, thus providing more privacy.
|
|
4847
4948
|
*
|
|
4848
4949
|
* @chrome-permission declarativeNetRequest
|
|
4849
|
-
* @
|
|
4950
|
+
* @chrome-permission declarativeNetRequestWithHostAccess
|
|
4951
|
+
* @chrome-channel trunk
|
|
4952
|
+
* @alpha
|
|
4850
4953
|
*/
|
|
4851
4954
|
export namespace declarativeNetRequest {
|
|
4852
4955
|
|
|
4853
4956
|
/**
|
|
4854
4957
|
* The minimum number of static rules guaranteed to an extension across its enabled static rulesets. Any rules above this limit will count towards the [global rule limit](https://developer.chrome.com/docs/extensions/reference/declarativeNetRequest/#global-rule-limit).
|
|
4855
|
-
*
|
|
4856
|
-
* @since Chrome 89
|
|
4857
4958
|
*/
|
|
4858
4959
|
export const GUARANTEED_MINIMUM_STATIC_RULES: 30000;
|
|
4859
4960
|
|
|
4860
4961
|
/**
|
|
4861
4962
|
* The maximum number of combined dynamic and session scoped rules an extension can add.
|
|
4862
|
-
*
|
|
4863
|
-
* @since Chrome 90
|
|
4864
4963
|
*/
|
|
4865
4964
|
export const MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES: 5000;
|
|
4866
4965
|
|
|
@@ -4898,8 +4997,6 @@ declare namespace chrome {
|
|
|
4898
4997
|
|
|
4899
4998
|
/**
|
|
4900
4999
|
* Ruleset ID for the session-scoped rules added by the extension.
|
|
4901
|
-
*
|
|
4902
|
-
* @since Chrome 90
|
|
4903
5000
|
*/
|
|
4904
5001
|
export const SESSION_RULESET_ID: "_session";
|
|
4905
5002
|
|
|
@@ -4958,7 +5055,6 @@ declare namespace chrome {
|
|
|
4958
5055
|
* * These rules are not persisted across sessions and are backed in memory.
|
|
4959
5056
|
* * {@link MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES} is the maximum number of combined dynamic and session rules an extension can add.
|
|
4960
5057
|
*
|
|
4961
|
-
* @since Chrome 90
|
|
4962
5058
|
* @param options
|
|
4963
5059
|
*/
|
|
4964
5060
|
export function updateSessionRules(
|
|
@@ -4972,7 +5068,6 @@ declare namespace chrome {
|
|
|
4972
5068
|
* * These rules are not persisted across sessions and are backed in memory.
|
|
4973
5069
|
* * {@link MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES} is the maximum number of combined dynamic and session rules an extension can add.
|
|
4974
5070
|
*
|
|
4975
|
-
* @since Chrome 90
|
|
4976
5071
|
* @param options
|
|
4977
5072
|
* @param callback Called once the update is complete or has failed. In case of an error, {@link runtime.lastError} will be set and no change will be made to the rule set. This can happen for multiple reasons, such as invalid rule format, duplicate rule ID, rule count limit exceeded, and others.
|
|
4978
5073
|
*/
|
|
@@ -4983,8 +5078,6 @@ declare namespace chrome {
|
|
|
4983
5078
|
|
|
4984
5079
|
/**
|
|
4985
5080
|
* Returns the current set of session scoped rules for the extension.
|
|
4986
|
-
*
|
|
4987
|
-
* @since Chrome 90
|
|
4988
5081
|
*/
|
|
4989
5082
|
export function getSessionRules(): Promise<{
|
|
4990
5083
|
rules: Rule[],
|
|
@@ -4993,7 +5086,6 @@ declare namespace chrome {
|
|
|
4993
5086
|
/**
|
|
4994
5087
|
* Returns the current set of session scoped rules for the extension.
|
|
4995
5088
|
*
|
|
4996
|
-
* @since Chrome 90
|
|
4997
5089
|
* @param callback Called with the set of session scoped rules.
|
|
4998
5090
|
*/
|
|
4999
5091
|
export function getSessionRules(
|
|
@@ -5080,7 +5172,6 @@ declare namespace chrome {
|
|
|
5080
5172
|
/**
|
|
5081
5173
|
* Configures if the action count for tabs should be displayed as the extension action's badge text and provides a way for that action count to be incremented.
|
|
5082
5174
|
*
|
|
5083
|
-
* @since Chrome 88
|
|
5084
5175
|
* @param options
|
|
5085
5176
|
*/
|
|
5086
5177
|
export function setExtensionActionOptions(
|
|
@@ -5090,7 +5181,6 @@ declare namespace chrome {
|
|
|
5090
5181
|
/**
|
|
5091
5182
|
* Configures if the action count for tabs should be displayed as the extension action's badge text and provides a way for that action count to be incremented.
|
|
5092
5183
|
*
|
|
5093
|
-
* @since Chrome 88
|
|
5094
5184
|
* @param options
|
|
5095
5185
|
* @param callback
|
|
5096
5186
|
*/
|
|
@@ -5102,7 +5192,6 @@ declare namespace chrome {
|
|
|
5102
5192
|
/**
|
|
5103
5193
|
* Checks if the given regular expression will be supported as a `regexFilter` rule condition.
|
|
5104
5194
|
*
|
|
5105
|
-
* @since Chrome 87
|
|
5106
5195
|
* @param regexOptions The regular expression to check.
|
|
5107
5196
|
*/
|
|
5108
5197
|
export function isRegexSupported(
|
|
@@ -5114,7 +5203,6 @@ declare namespace chrome {
|
|
|
5114
5203
|
/**
|
|
5115
5204
|
* Checks if the given regular expression will be supported as a `regexFilter` rule condition.
|
|
5116
5205
|
*
|
|
5117
|
-
* @since Chrome 87
|
|
5118
5206
|
* @param regexOptions The regular expression to check.
|
|
5119
5207
|
* @param callback Called with details consisting of whether the regular expression is supported and the reason if not.
|
|
5120
5208
|
*/
|
|
@@ -5127,8 +5215,6 @@ declare namespace chrome {
|
|
|
5127
5215
|
|
|
5128
5216
|
/**
|
|
5129
5217
|
* Returns the number of static rules an extension can enable before the [global static rule limit](https://developer.chrome.com/docs/extensions/reference/declarativeNetRequest/#global-rule-limit) is reached.
|
|
5130
|
-
*
|
|
5131
|
-
* @since Chrome 89
|
|
5132
5218
|
*/
|
|
5133
5219
|
export function getAvailableStaticRuleCount(): Promise<{
|
|
5134
5220
|
count: number,
|
|
@@ -5137,7 +5223,6 @@ declare namespace chrome {
|
|
|
5137
5223
|
/**
|
|
5138
5224
|
* Returns the number of static rules an extension can enable before the [global static rule limit](https://developer.chrome.com/docs/extensions/reference/declarativeNetRequest/#global-rule-limit) is reached.
|
|
5139
5225
|
*
|
|
5140
|
-
* @since Chrome 89
|
|
5141
5226
|
* @param callback
|
|
5142
5227
|
*/
|
|
5143
5228
|
export function getAvailableStaticRuleCount(
|
|
@@ -5153,8 +5238,6 @@ declare namespace chrome {
|
|
|
5153
5238
|
|
|
5154
5239
|
/**
|
|
5155
5240
|
* This describes the HTTP request method of a network request.
|
|
5156
|
-
*
|
|
5157
|
-
* @since Chrome 91
|
|
5158
5241
|
*/
|
|
5159
5242
|
export type RequestMethod = "delete" | "get" | "head" | "options" | "patch" | "post" | "put";
|
|
5160
5243
|
|
|
@@ -5165,8 +5248,6 @@ declare namespace chrome {
|
|
|
5165
5248
|
|
|
5166
5249
|
/**
|
|
5167
5250
|
* This describes the possible operations for a "modifyHeaders" rule.
|
|
5168
|
-
*
|
|
5169
|
-
* @since Chrome 86
|
|
5170
5251
|
*/
|
|
5171
5252
|
export type HeaderOperation = "append" | "set" | "remove";
|
|
5172
5253
|
|
|
@@ -5177,8 +5258,6 @@ declare namespace chrome {
|
|
|
5177
5258
|
|
|
5178
5259
|
/**
|
|
5179
5260
|
* Describes the reason why a given regular expression isn't supported.
|
|
5180
|
-
*
|
|
5181
|
-
* @since Chrome 87
|
|
5182
5261
|
*/
|
|
5183
5262
|
export type UnsupportedRegexReason = "syntaxError" | "memoryLimitExceeded";
|
|
5184
5263
|
|
|
@@ -5377,15 +5456,11 @@ declare namespace chrome {
|
|
|
5377
5456
|
* List of HTTP request methods which the rule can match. An empty list is not allowed.
|
|
5378
5457
|
*
|
|
5379
5458
|
* Note: Specifying a `requestMethods` rule condition will also exclude non-HTTP(s) requests, whereas specifying `excludedRequestMethods` will not.
|
|
5380
|
-
*
|
|
5381
|
-
* @since Chrome 91
|
|
5382
5459
|
*/
|
|
5383
5460
|
requestMethods?: RequestMethod[];
|
|
5384
5461
|
|
|
5385
5462
|
/**
|
|
5386
5463
|
* List of request methods which the rule won't match. Only one of `requestMethods` and `excludedRequestMethods` should be specified. If neither of them is specified, all request methods are matched.
|
|
5387
|
-
*
|
|
5388
|
-
* @since Chrome 91
|
|
5389
5464
|
*/
|
|
5390
5465
|
excludedRequestMethods?: RequestMethod[];
|
|
5391
5466
|
|
|
@@ -5396,22 +5471,15 @@ declare namespace chrome {
|
|
|
5396
5471
|
|
|
5397
5472
|
/**
|
|
5398
5473
|
* List of {@link tabs.Tab.id} which the rule should match. An ID of {@link tabs.TAB_ID_NONE} matches requests which don't originate from a tab. An empty list is not allowed. Only supported for session-scoped rules.
|
|
5399
|
-
*
|
|
5400
|
-
* @since Chrome 92
|
|
5401
5474
|
*/
|
|
5402
5475
|
tabIds?: number[];
|
|
5403
5476
|
|
|
5404
5477
|
/**
|
|
5405
5478
|
* List of {@link tabs.Tab.id} which the rule should not match. An ID of {@link tabs.TAB_ID_NONE} excludes requests which don't originate from a tab. Only supported for session-scoped rules.
|
|
5406
|
-
*
|
|
5407
|
-
* @since Chrome 92
|
|
5408
5479
|
*/
|
|
5409
5480
|
excludedTabIds?: number[];
|
|
5410
5481
|
}
|
|
5411
5482
|
|
|
5412
|
-
/**
|
|
5413
|
-
* @since Chrome 86
|
|
5414
|
-
*/
|
|
5415
5483
|
export interface ModifyHeaderInfo {
|
|
5416
5484
|
|
|
5417
5485
|
/**
|
|
@@ -5444,15 +5512,11 @@ declare namespace chrome {
|
|
|
5444
5512
|
|
|
5445
5513
|
/**
|
|
5446
5514
|
* The request headers to modify for the request. Only valid if RuleActionType is "modifyHeaders".
|
|
5447
|
-
*
|
|
5448
|
-
* @since Chrome 86
|
|
5449
5515
|
*/
|
|
5450
5516
|
requestHeaders?: ModifyHeaderInfo[];
|
|
5451
5517
|
|
|
5452
5518
|
/**
|
|
5453
5519
|
* The response headers to modify for the request. Only valid if RuleActionType is "modifyHeaders".
|
|
5454
|
-
*
|
|
5455
|
-
* @since Chrome 86
|
|
5456
5520
|
*/
|
|
5457
5521
|
responseHeaders?: ModifyHeaderInfo[];
|
|
5458
5522
|
}
|
|
@@ -5582,9 +5646,6 @@ declare namespace chrome {
|
|
|
5582
5646
|
request: RequestDetails;
|
|
5583
5647
|
}
|
|
5584
5648
|
|
|
5585
|
-
/**
|
|
5586
|
-
* @since Chrome 87
|
|
5587
|
-
*/
|
|
5588
5649
|
export interface RegexOptions {
|
|
5589
5650
|
|
|
5590
5651
|
/**
|
|
@@ -5603,9 +5664,6 @@ declare namespace chrome {
|
|
|
5603
5664
|
requireCapturing?: boolean;
|
|
5604
5665
|
}
|
|
5605
5666
|
|
|
5606
|
-
/**
|
|
5607
|
-
* @since Chrome 87
|
|
5608
|
-
*/
|
|
5609
5667
|
export interface IsRegexSupportedResult {
|
|
5610
5668
|
|
|
5611
5669
|
isSupported: boolean;
|
|
@@ -5616,9 +5674,6 @@ declare namespace chrome {
|
|
|
5616
5674
|
reason?: UnsupportedRegexReason;
|
|
5617
5675
|
}
|
|
5618
5676
|
|
|
5619
|
-
/**
|
|
5620
|
-
* @since Chrome 87
|
|
5621
|
-
*/
|
|
5622
5677
|
export interface UpdateRuleOptions {
|
|
5623
5678
|
|
|
5624
5679
|
/**
|
|
@@ -5632,9 +5687,6 @@ declare namespace chrome {
|
|
|
5632
5687
|
addRules?: Rule[];
|
|
5633
5688
|
}
|
|
5634
5689
|
|
|
5635
|
-
/**
|
|
5636
|
-
* @since Chrome 87
|
|
5637
|
-
*/
|
|
5638
5690
|
export interface UpdateRulesetOptions {
|
|
5639
5691
|
|
|
5640
5692
|
/**
|
|
@@ -5648,9 +5700,6 @@ declare namespace chrome {
|
|
|
5648
5700
|
enableRulesetIds?: string[];
|
|
5649
5701
|
}
|
|
5650
5702
|
|
|
5651
|
-
/**
|
|
5652
|
-
* @since Chrome 89
|
|
5653
|
-
*/
|
|
5654
5703
|
export interface TabActionCountUpdate {
|
|
5655
5704
|
|
|
5656
5705
|
/**
|
|
@@ -5664,9 +5713,6 @@ declare namespace chrome {
|
|
|
5664
5713
|
increment: number;
|
|
5665
5714
|
}
|
|
5666
5715
|
|
|
5667
|
-
/**
|
|
5668
|
-
* @since Chrome 88
|
|
5669
|
-
*/
|
|
5670
5716
|
export interface ExtensionActionOptions {
|
|
5671
5717
|
|
|
5672
5718
|
/**
|
|
@@ -5676,8 +5722,6 @@ declare namespace chrome {
|
|
|
5676
5722
|
|
|
5677
5723
|
/**
|
|
5678
5724
|
* Details of how the tab's action count should be adjusted.
|
|
5679
|
-
*
|
|
5680
|
-
* @since Chrome 89
|
|
5681
5725
|
*/
|
|
5682
5726
|
tabUpdate?: TabActionCountUpdate;
|
|
5683
5727
|
}
|
|
@@ -5690,8 +5734,6 @@ declare namespace chrome {
|
|
|
5690
5734
|
export const onRuleMatchedDebug: events.Event<(
|
|
5691
5735
|
/**
|
|
5692
5736
|
* The rule that has been matched along with information about the associated request.
|
|
5693
|
-
*
|
|
5694
|
-
* @since Chrome 85
|
|
5695
5737
|
*/
|
|
5696
5738
|
info: MatchedRuleInfoDebug,
|
|
5697
5739
|
) => void>;
|
|
@@ -14254,6 +14296,13 @@ declare namespace chrome {
|
|
|
14254
14296
|
*/
|
|
14255
14297
|
export type StyleOrigin = "AUTHOR" | "USER";
|
|
14256
14298
|
|
|
14299
|
+
/**
|
|
14300
|
+
* The JavaScript world for a script to execute within.
|
|
14301
|
+
*
|
|
14302
|
+
* @chrome-unknown-version
|
|
14303
|
+
*/
|
|
14304
|
+
export type ExecutionWorld = "ISOLATED" | "MAIN";
|
|
14305
|
+
|
|
14257
14306
|
export interface InjectionTarget {
|
|
14258
14307
|
|
|
14259
14308
|
/**
|
|
@@ -14297,6 +14346,13 @@ declare namespace chrome {
|
|
|
14297
14346
|
* Details specifying the target into which to inject the script.
|
|
14298
14347
|
*/
|
|
14299
14348
|
target: InjectionTarget;
|
|
14349
|
+
|
|
14350
|
+
/**
|
|
14351
|
+
* The JavaScript "world" to run the script in. Defaults to `ISOLATED`.
|
|
14352
|
+
*
|
|
14353
|
+
* @chrome-unknown-version
|
|
14354
|
+
*/
|
|
14355
|
+
world?: ExecutionWorld;
|
|
14300
14356
|
}
|
|
14301
14357
|
|
|
14302
14358
|
export interface CSSInjection {
|
|
@@ -18408,6 +18464,41 @@ declare namespace chrome {
|
|
|
18408
18464
|
*/
|
|
18409
18465
|
export interface ChromeSetting<T> {
|
|
18410
18466
|
|
|
18467
|
+
/**
|
|
18468
|
+
* Gets the value of a setting.
|
|
18469
|
+
*
|
|
18470
|
+
* @param details Which setting to consider.
|
|
18471
|
+
*/
|
|
18472
|
+
get(
|
|
18473
|
+
details: {
|
|
18474
|
+
/**
|
|
18475
|
+
* Whether to return the value that applies to the incognito session (default false).
|
|
18476
|
+
*/
|
|
18477
|
+
incognito?: boolean,
|
|
18478
|
+
},
|
|
18479
|
+
): Promise<{
|
|
18480
|
+
/**
|
|
18481
|
+
* Details of the currently effective value.
|
|
18482
|
+
*/
|
|
18483
|
+
details: {
|
|
18484
|
+
/**
|
|
18485
|
+
* The value of the setting.
|
|
18486
|
+
*/
|
|
18487
|
+
value: T,
|
|
18488
|
+
|
|
18489
|
+
/**
|
|
18490
|
+
* The level of control of the setting.
|
|
18491
|
+
*/
|
|
18492
|
+
levelOfControl: LevelOfControl,
|
|
18493
|
+
|
|
18494
|
+
/**
|
|
18495
|
+
* Whether the effective value is specific to the incognito session.
|
|
18496
|
+
* This property will _only_ be present if the incognito property in the details parameter of `get()` was true.
|
|
18497
|
+
*/
|
|
18498
|
+
incognitoSpecific?: boolean,
|
|
18499
|
+
},
|
|
18500
|
+
}>;
|
|
18501
|
+
|
|
18411
18502
|
/**
|
|
18412
18503
|
* Gets the value of a setting.
|
|
18413
18504
|
*
|
|
@@ -18445,6 +18536,26 @@ declare namespace chrome {
|
|
|
18445
18536
|
) => void,
|
|
18446
18537
|
): void;
|
|
18447
18538
|
|
|
18539
|
+
/**
|
|
18540
|
+
* Sets the value of a setting.
|
|
18541
|
+
*
|
|
18542
|
+
* @param details Which setting to change.
|
|
18543
|
+
*/
|
|
18544
|
+
set(
|
|
18545
|
+
details: {
|
|
18546
|
+
/**
|
|
18547
|
+
* The value of the setting.
|
|
18548
|
+
* Note that every setting has a specific value type, which is described together with the setting. An extension should _not_ set a value of a different type.
|
|
18549
|
+
*/
|
|
18550
|
+
value: T,
|
|
18551
|
+
|
|
18552
|
+
/**
|
|
18553
|
+
* Where to set the setting (default: regular).
|
|
18554
|
+
*/
|
|
18555
|
+
scope?: ChromeSettingScope,
|
|
18556
|
+
},
|
|
18557
|
+
): Promise<{}>;
|
|
18558
|
+
|
|
18448
18559
|
/**
|
|
18449
18560
|
* Sets the value of a setting.
|
|
18450
18561
|
*
|
|
@@ -18467,6 +18578,20 @@ declare namespace chrome {
|
|
|
18467
18578
|
callback?: () => void,
|
|
18468
18579
|
): void;
|
|
18469
18580
|
|
|
18581
|
+
/**
|
|
18582
|
+
* Clears the setting, restoring any default value.
|
|
18583
|
+
*
|
|
18584
|
+
* @param details Which setting to clear.
|
|
18585
|
+
*/
|
|
18586
|
+
clear(
|
|
18587
|
+
details: {
|
|
18588
|
+
/**
|
|
18589
|
+
* Where to clear the setting (default: regular).
|
|
18590
|
+
*/
|
|
18591
|
+
scope?: ChromeSettingScope,
|
|
18592
|
+
},
|
|
18593
|
+
): Promise<{}>;
|
|
18594
|
+
|
|
18470
18595
|
/**
|
|
18471
18596
|
* Clears the setting, restoring any default value.
|
|
18472
18597
|
*
|