You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: types/chrome/index.d.ts
+33-16Lines changed: 33 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -346,9 +346,10 @@ declare namespace chrome {
346
346
export function setIcon(details: TabIconDetails, callback: () => void): void;
347
347
348
348
/**
349
-
* Sets the html document to be opened as a popup when the user clicks on the action's icon.
349
+
* Sets the HTML document to be opened as a popup when the user clicks on the action's icon.
350
350
*
351
351
* Can return its result via Promise.
352
+
* @since Chrome 96
352
353
*/
353
354
export function setPopup(details: PopupDetails): Promise<void>;
354
355
export function setPopup(details: PopupDetails, callback: () => void): void;
@@ -1165,6 +1166,7 @@ declare namespace chrome {
1165
1166
* Clears websites' cache storage data.
1166
1167
*
1167
1168
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
1169
+
* @since Chrome 72
1168
1170
*/
1169
1171
export function removeCacheStorage(options: RemovalOptions): Promise<void>;
1170
1172
export function removeCacheStorage(options: RemovalOptions, callback: () => void): void;
@@ -2433,7 +2435,17 @@ declare namespace chrome {
2433
2435
* Exactly one of `imageData` or `path` must be specified. Both are dictionaries mapping a number of pixels to an image representation. The image representation in `imageData` is an `ImageData` object; for example, from a `canvas` element, while the image representation in `path` is the path to an image file relative to the extension's manifest. If `scale` screen pixels fit into a device-independent pixel, the `scale * n` icon is used. If that scale is missing, another image is resized to the required size.
/** Provides the Declarative Event API consisting of {@link events.Event.addRules addRules}, {@link events.Event.removeRules removeRules}, and {@link events.Event.getRules getRules}. */
@@ -3330,7 +3342,7 @@ declare namespace chrome {
3330
3342
/** Indicates the data type of the option. The requested data type must match the real data type of the underlying option. */
3331
3343
type: `${OptionType}`;
3332
3344
/** Indicates the value to set. Leave unset to request automatic setting for options that have `autoSettable` enabled. The data type supplied for `value` must match `type`. */
3333
-
value?: string | number | boolean | number;
3345
+
value?: string | number | boolean | number[];
3334
3346
}
3335
3347
3336
3348
/**
@@ -3560,6 +3572,8 @@ declare namespace chrome {
3560
3572
/**
3561
3573
* Performs a document scan and returns a Promise that resolves with a {@link ScanResults} object. If a callback is passed to this function, the returned data is passed to it instead.
3562
3574
* @param options An object containing scan parameters.
3575
+
*
3576
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
3563
3577
*/
3564
3578
export function scan(options: ScanOptions): Promise<ScanResults>;
3565
3579
export function scan(options: ScanOptions, callback: (result: ScanResults) => void): void;
@@ -4364,9 +4378,12 @@ declare namespace chrome {
4364
4378
}
4365
4379
4366
4380
/**
4367
-
* Retrieves the network details of the device's default network. If the user is not affiliated or the device is not connected to a network, runtime.lastError will be set with a failure reason.
4381
+
* Retrieves the network details of the device's default network. If the user is not affiliated or the device is not connected to a network, {@link runtime.lastError} will be set with a failure reason.
4368
4382
* @param callback Called with the device's default network's NetworkDetails.
4383
+
*
4384
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
4369
4385
*/
4386
+
export function getNetworkDetails(): Promise<NetworkDetails>;
4370
4387
export function getNetworkDetails(callback: (networkDetails: NetworkDetails) => void): void;
4371
4388
}
4372
4389
@@ -6308,7 +6325,7 @@ declare namespace chrome {
6308
6325
* This API is different from identity.getAccounts in two ways. The information returned is available offline, and it only applies to the primary account for the profile.
6309
6326
* @param details Profile options.
6310
6327
*
6311
-
* Can return its result via Promise since Chrome 105.
6328
+
* Can return its result via Promise since Chrome 106.
6312
6329
*/
6313
6330
export function getProfileUserInfo(details?: ProfileDetails): Promise<ProfileUserInfo>;
6314
6331
export function getProfileUserInfo(
@@ -6323,7 +6340,7 @@ declare namespace chrome {
6323
6340
* If an access token is discovered to be invalid, it should be passed to removeCachedAuthToken to remove it from the cache. The app may then retrieve a fresh token with `getAuthToken`.
6324
6341
* @param details Token information.
6325
6342
*
6326
-
* Can return its result via Promise since Chrome 105.
6343
+
* Can return its result via Promise since Chrome 106.
6327
6344
*/
6328
6345
export function removeCachedAuthToken(details: InvalidTokenDetails): Promise<void>;
6329
6346
export function removeCachedAuthToken(details: InvalidTokenDetails, callback: () => void): void;
@@ -7911,7 +7928,7 @@ declare namespace chrome {
7911
7928
7912
7929
export enum ClientCertificateType {
7913
7930
ECDSA_SIGN = "ecdsaSign",
7914
-
RAS_SIGN = "rasSign",
7931
+
RSA_SIGN = "rsaSign",
7915
7932
}
7916
7933
7917
7934
export interface SelectDetails {
@@ -8806,7 +8823,7 @@ declare namespace chrome {
8806
8823
export type QueryInfo =
8807
8824
& {
8808
8825
/** String to query with the default search provider. */
/** Contains the HTTP request body data. Only provided if extraInfoSpec contains 'requestBody'. */
13289
-
requestBody: {
13306
+
requestBody?: {
13290
13307
/** Errors when obtaining request body data. */
13291
13308
error?: string;
13292
13309
/** If the request method is POST and the body is a sequence of key-value pairs encoded in UTF8, encoded as either multipart/form-data, or application/x-www-form-urlencoded, this dictionary is present and for each key contains the list of all values for that key. If the data is of another media type, or if it is malformed, the dictionary is not present. An example value of this dictionary is {'key': \['value1', 'value2'\]}. */
13293
13310
formData?: { [key: string]: FormDataItem[] };
13294
13311
/** If the request method is PUT or POST, and the body is not already parsed in formData, then the unparsed request body elements are contained in this array. */
* The headers provided by a hypothetical response if the request does not get blocked or redirected before it is sent. Represented as an object which maps a header name to a list of string values. If not specified, the hypothetical response would return empty response headers, which can match rules which match on the non-existence of headers. E.g. `{"content-type": ["text/html; charset=utf-8", "multipart/form-data"]}`
14346
14363
* @since Chrome 129
14347
14364
*/
14348
-
responseHeaders?: { [name: string]: unknown };
14365
+
responseHeaders?: { [name: string]: string[] };
14349
14366
/** The ID of the tab in which the hypothetical request takes place. Does not need to correspond to a real tab ID. Default is -1, meaning that the request isn't related to a tab. */
/** Specifies wildcard patterns for pages this user script will be injected into. */
14796
14813
includeGlobs?: string[] | undefined;
14797
14814
/** The list of ScriptSource objects defining sources of scripts to be injected into matching pages. This property must be specified for {@link register}, and when specified it must be a non-empty array.*/
14798
-
js: ScriptSource[];
14815
+
js?: ScriptSource[] | undefined;
14799
14816
/** Specifies which pages this user script will be injected into. See Match Patterns for more details on the syntax of these strings. This property must be specified for {@link register}. */
14800
14817
matches?: string[] | undefined;
14801
14818
/** Specifies when JavaScript files are injected into the web page. The preferred and default value is `document_idle` */
0 commit comments