@types/chrome 0.3.2 → 0.3.4
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.
- chrome/README.md +1 -1
- chrome/index.d.ts +357 -246
- chrome/package.json +2 -2
chrome/index.d.ts
CHANGED
|
@@ -187,7 +187,7 @@ declare namespace chrome {
|
|
|
187
187
|
interface PopupDetails {
|
|
188
188
|
/** Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
|
|
189
189
|
tabId?: number | undefined;
|
|
190
|
-
/** The
|
|
190
|
+
/** The relative path to the HTML file to show in a popup. If set to the empty string (`''`), no popup is shown. */
|
|
191
191
|
popup: string;
|
|
192
192
|
}
|
|
193
193
|
|
|
@@ -241,7 +241,7 @@ declare namespace chrome {
|
|
|
241
241
|
* Disables the action for a tab.
|
|
242
242
|
* @param tabId The ID of the tab for which you want to modify the action.
|
|
243
243
|
*
|
|
244
|
-
* Can return its result via Promise.
|
|
244
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
245
245
|
*/
|
|
246
246
|
function disable(tabId?: number): Promise<void>;
|
|
247
247
|
function disable(callback: () => void): void;
|
|
@@ -251,7 +251,7 @@ declare namespace chrome {
|
|
|
251
251
|
* Enables the action for a tab. By default, actions are enabled.
|
|
252
252
|
* @param tabId The ID of the tab for which you want to modify the action.
|
|
253
253
|
*
|
|
254
|
-
* Can return its result via Promise.
|
|
254
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
255
255
|
*/
|
|
256
256
|
function enable(tabId?: number): Promise<void>;
|
|
257
257
|
function enable(callback: () => void): void;
|
|
@@ -260,7 +260,7 @@ declare namespace chrome {
|
|
|
260
260
|
/**
|
|
261
261
|
* Gets the background color of the action.
|
|
262
262
|
*
|
|
263
|
-
* Can return its result via Promise.
|
|
263
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
264
264
|
*/
|
|
265
265
|
function getBadgeBackgroundColor(details: TabDetails): Promise<extensionTypes.ColorArray>;
|
|
266
266
|
function getBadgeBackgroundColor(
|
|
@@ -271,7 +271,7 @@ declare namespace chrome {
|
|
|
271
271
|
/**
|
|
272
272
|
* Gets the badge text of the action. If no tab is specified, the non-tab-specific badge text is returned. If {@link declarativeNetRequest.ExtensionActionOptions.displayActionCountAsBadgeText displayActionCountAsBadgeText} is enabled, a placeholder text will be returned unless the {@link runtime.ManifestPermission declarativeNetRequestFeedback} permission is present or tab-specific badge text was provided.
|
|
273
273
|
*
|
|
274
|
-
* Can return its result via Promise.
|
|
274
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
275
275
|
*/
|
|
276
276
|
function getBadgeText(details: TabDetails): Promise<string>;
|
|
277
277
|
function getBadgeText(details: TabDetails, callback: (result: string) => void): void;
|
|
@@ -279,7 +279,7 @@ declare namespace chrome {
|
|
|
279
279
|
/**
|
|
280
280
|
* Gets the text color of the action.
|
|
281
281
|
*
|
|
282
|
-
* Can return its result via Promise.
|
|
282
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
283
283
|
* @since Chrome 110
|
|
284
284
|
*/
|
|
285
285
|
function getBadgeTextColor(details: TabDetails): Promise<extensionTypes.ColorArray>;
|
|
@@ -291,7 +291,7 @@ declare namespace chrome {
|
|
|
291
291
|
/**
|
|
292
292
|
* Gets the html document set as the popup for this action.
|
|
293
293
|
*
|
|
294
|
-
* Can return its result via Promise.
|
|
294
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
295
295
|
*/
|
|
296
296
|
function getPopup(details: TabDetails): Promise<string>;
|
|
297
297
|
function getPopup(details: TabDetails, callback: (result: string) => void): void;
|
|
@@ -299,7 +299,7 @@ declare namespace chrome {
|
|
|
299
299
|
/**
|
|
300
300
|
* Gets the title of the action.
|
|
301
301
|
*
|
|
302
|
-
* Can return its result via Promise.
|
|
302
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
303
303
|
*/
|
|
304
304
|
function getTitle(details: TabDetails): Promise<string>;
|
|
305
305
|
function getTitle(details: TabDetails, callback: (result: string) => void): void;
|
|
@@ -307,7 +307,7 @@ declare namespace chrome {
|
|
|
307
307
|
/**
|
|
308
308
|
* Returns the user-specified settings relating to an extension's action.
|
|
309
309
|
*
|
|
310
|
-
* Can return its result via Promise.
|
|
310
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
311
311
|
* @since Chrome 91
|
|
312
312
|
*/
|
|
313
313
|
function getUserSettings(): Promise<UserSettings>;
|
|
@@ -315,8 +315,9 @@ declare namespace chrome {
|
|
|
315
315
|
|
|
316
316
|
/**
|
|
317
317
|
* Indicates whether the extension action is enabled for a tab (or globally if no `tabId` is provided). Actions enabled using only {@link declarativeContent} always return false.
|
|
318
|
+
* @param tabId The ID of the tab for which you want to check the enabled status.
|
|
318
319
|
*
|
|
319
|
-
* Can return its result via Promise.
|
|
320
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
320
321
|
* @since Chrome 110
|
|
321
322
|
*/
|
|
322
323
|
function isEnabled(tabId?: number): Promise<boolean>;
|
|
@@ -328,7 +329,7 @@ declare namespace chrome {
|
|
|
328
329
|
*
|
|
329
330
|
* @param options Specifies options for opening the popup.
|
|
330
331
|
*
|
|
331
|
-
* Can return its result via Promise.
|
|
332
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
332
333
|
* @since Chrome 127
|
|
333
334
|
*/
|
|
334
335
|
function openPopup(options?: OpenPopupOptions): Promise<void>;
|
|
@@ -338,7 +339,7 @@ declare namespace chrome {
|
|
|
338
339
|
/**
|
|
339
340
|
* Sets the background color for the badge.
|
|
340
341
|
*
|
|
341
|
-
* Can return its result via Promise.
|
|
342
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
342
343
|
*/
|
|
343
344
|
function setBadgeBackgroundColor(details: BadgeColorDetails): Promise<void>;
|
|
344
345
|
function setBadgeBackgroundColor(details: BadgeColorDetails, callback: () => void): void;
|
|
@@ -346,7 +347,7 @@ declare namespace chrome {
|
|
|
346
347
|
/**
|
|
347
348
|
* Sets the badge text for the action. The badge is displayed on top of the icon.
|
|
348
349
|
*
|
|
349
|
-
* Can return its result via Promise.
|
|
350
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
350
351
|
*/
|
|
351
352
|
function setBadgeText(details: BadgeTextDetails): Promise<void>;
|
|
352
353
|
function setBadgeText(details: BadgeTextDetails, callback: () => void): void;
|
|
@@ -354,7 +355,7 @@ declare namespace chrome {
|
|
|
354
355
|
/**
|
|
355
356
|
* Sets the text color for the badge.
|
|
356
357
|
*
|
|
357
|
-
* Can return its result via Promise.
|
|
358
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
358
359
|
* @since Chrome 110
|
|
359
360
|
*/
|
|
360
361
|
function setBadgeTextColor(details: BadgeColorDetails): Promise<void>;
|
|
@@ -363,7 +364,7 @@ declare namespace chrome {
|
|
|
363
364
|
/**
|
|
364
365
|
* Sets the icon for the action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the path or the imageData property must be specified.
|
|
365
366
|
*
|
|
366
|
-
* Can return its result via Promise.
|
|
367
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
|
367
368
|
*/
|
|
368
369
|
function setIcon(details: TabIconDetails): Promise<void>;
|
|
369
370
|
function setIcon(details: TabIconDetails, callback: () => void): void;
|
|
@@ -371,8 +372,7 @@ declare namespace chrome {
|
|
|
371
372
|
/**
|
|
372
373
|
* Sets the HTML document to be opened as a popup when the user clicks on the action's icon.
|
|
373
374
|
*
|
|
374
|
-
* Can return its result via Promise.
|
|
375
|
-
* @since Chrome 96
|
|
375
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
376
376
|
*/
|
|
377
377
|
function setPopup(details: PopupDetails): Promise<void>;
|
|
378
378
|
function setPopup(details: PopupDetails, callback: () => void): void;
|
|
@@ -380,7 +380,7 @@ declare namespace chrome {
|
|
|
380
380
|
/**
|
|
381
381
|
* Sets the title of the action. This shows up in the tooltip.
|
|
382
382
|
*
|
|
383
|
-
* Can return its result via Promise.
|
|
383
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
384
384
|
*/
|
|
385
385
|
function setTitle(details: TitleDetails): Promise<void>;
|
|
386
386
|
function setTitle(details: TitleDetails, callback: () => void): void;
|
|
@@ -501,6 +501,7 @@ declare namespace chrome {
|
|
|
501
501
|
|
|
502
502
|
/**
|
|
503
503
|
* Clears the alarm with the given name.
|
|
504
|
+
* @param name Optional name to identify this alarm. Defaults to the empty string.
|
|
504
505
|
*
|
|
505
506
|
* Can return its result via Promise in Manifest V3 or later since Chrome 91.
|
|
506
507
|
*/
|
|
@@ -728,7 +729,7 @@ declare namespace chrome {
|
|
|
728
729
|
title: string;
|
|
729
730
|
/** Indicates the reason why this node is unmodifiable. The `managed` value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default). */
|
|
730
731
|
unmodifiable?: `${BookmarkTreeNodeUnmodifiable}`;
|
|
731
|
-
|
|
732
|
+
/** The URL navigated to when a user clicks the bookmark. Omitted for folders. */
|
|
732
733
|
url?: string;
|
|
733
734
|
}
|
|
734
735
|
|
|
@@ -753,7 +754,6 @@ declare namespace chrome {
|
|
|
753
754
|
* Indicates the type of folder.
|
|
754
755
|
* @since Chrome 134
|
|
755
756
|
*/
|
|
756
|
-
|
|
757
757
|
enum FolderType {
|
|
758
758
|
/** The folder whose contents is displayed at the top of the browser window. */
|
|
759
759
|
BOOKMARKS_BAR = "bookmarks-bar",
|
|
@@ -780,7 +780,7 @@ declare namespace chrome {
|
|
|
780
780
|
/**
|
|
781
781
|
* Creates a bookmark or folder under the specified parentId. If url is NULL or missing, it will be a folder.
|
|
782
782
|
*
|
|
783
|
-
* Can return its result via Promise since Chrome 90.
|
|
783
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 90.
|
|
784
784
|
*/
|
|
785
785
|
function create(bookmark: CreateDetails): Promise<BookmarkTreeNode>;
|
|
786
786
|
function create(bookmark: CreateDetails, callback: (result: BookmarkTreeNode) => void): void;
|
|
@@ -789,7 +789,7 @@ declare namespace chrome {
|
|
|
789
789
|
* Retrieves the specified BookmarkTreeNode(s).
|
|
790
790
|
* @param idOrIdList A single string-valued id, or an array of string-valued ids
|
|
791
791
|
*
|
|
792
|
-
* Can return its result via Promise since Chrome 90.
|
|
792
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 90.
|
|
793
793
|
*/
|
|
794
794
|
function get(idOrIdList: string | [string, ...string[]]): Promise<BookmarkTreeNode[]>;
|
|
795
795
|
function get(
|
|
@@ -800,7 +800,7 @@ declare namespace chrome {
|
|
|
800
800
|
/**
|
|
801
801
|
* Retrieves the children of the specified BookmarkTreeNode id.
|
|
802
802
|
*
|
|
803
|
-
* Can return its result via Promise since Chrome
|
|
803
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 90.
|
|
804
804
|
*/
|
|
805
805
|
function getChildren(id: string): Promise<BookmarkTreeNode[]>;
|
|
806
806
|
function getChildren(id: string, callback: (results: BookmarkTreeNode[]) => void): void;
|
|
@@ -809,7 +809,7 @@ declare namespace chrome {
|
|
|
809
809
|
* Retrieves the recently added bookmarks.
|
|
810
810
|
* @param numberOfItems The maximum number of items to return.
|
|
811
811
|
*
|
|
812
|
-
* Can return its result via Promise since Chrome
|
|
812
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 90.
|
|
813
813
|
*/
|
|
814
814
|
function getRecent(numberOfItems: number): Promise<BookmarkTreeNode[]>;
|
|
815
815
|
function getRecent(numberOfItems: number, callback: (results: BookmarkTreeNode[]) => void): void;
|
|
@@ -818,7 +818,7 @@ declare namespace chrome {
|
|
|
818
818
|
* Retrieves part of the Bookmarks hierarchy, starting at the specified node.
|
|
819
819
|
* @param id The ID of the root of the subtree to retrieve.
|
|
820
820
|
*
|
|
821
|
-
* Can return its result via Promise since Chrome
|
|
821
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 90.
|
|
822
822
|
*/
|
|
823
823
|
function getSubTree(id: string): Promise<BookmarkTreeNode[]>;
|
|
824
824
|
function getSubTree(id: string, callback: (results: BookmarkTreeNode[]) => void): void;
|
|
@@ -826,7 +826,7 @@ declare namespace chrome {
|
|
|
826
826
|
/**
|
|
827
827
|
* Retrieves the entire Bookmarks hierarchy.
|
|
828
828
|
*
|
|
829
|
-
* Can return its result via Promise since Chrome
|
|
829
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 90.
|
|
830
830
|
*/
|
|
831
831
|
function getTree(): Promise<BookmarkTreeNode[]>;
|
|
832
832
|
function getTree(callback: (results: BookmarkTreeNode[]) => void): void;
|
|
@@ -839,7 +839,7 @@ declare namespace chrome {
|
|
|
839
839
|
/**
|
|
840
840
|
* Moves the specified BookmarkTreeNode to the provided location.
|
|
841
841
|
*
|
|
842
|
-
* Can return its result via Promise since Chrome
|
|
842
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 90.
|
|
843
843
|
*/
|
|
844
844
|
function move(id: string, destination: MoveDestination): Promise<BookmarkTreeNode>;
|
|
845
845
|
function move(
|
|
@@ -851,7 +851,7 @@ declare namespace chrome {
|
|
|
851
851
|
/**
|
|
852
852
|
* Removes a bookmark or an empty bookmark folder.
|
|
853
853
|
*
|
|
854
|
-
* Can return its result via Promise since Chrome
|
|
854
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 90.
|
|
855
855
|
*/
|
|
856
856
|
function remove(id: string): Promise<void>;
|
|
857
857
|
function remove(id: string, callback: () => void): void;
|
|
@@ -859,7 +859,7 @@ declare namespace chrome {
|
|
|
859
859
|
/**
|
|
860
860
|
* Recursively removes a bookmark folder.
|
|
861
861
|
*
|
|
862
|
-
* Can return its result via Promise since Chrome
|
|
862
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 90.
|
|
863
863
|
*/
|
|
864
864
|
function removeTree(id: string): Promise<void>;
|
|
865
865
|
function removeTree(id: string, callback: () => void): void;
|
|
@@ -877,7 +877,7 @@ declare namespace chrome {
|
|
|
877
877
|
* Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties.
|
|
878
878
|
* @param query Either a string of words and quoted phrases that are matched against bookmark URLs and titles, or an object. If an object, the properties `query`, `url`, and `title` may be specified and bookmarks matching all specified properties will be produced.
|
|
879
879
|
*
|
|
880
|
-
* Can return its result via Promise since Chrome
|
|
880
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 90.
|
|
881
881
|
*/
|
|
882
882
|
function search(query: string | SearchQuery): Promise<BookmarkTreeNode[]>;
|
|
883
883
|
function search(query: string | SearchQuery, callback: (results: BookmarkTreeNode[]) => void): void;
|
|
@@ -890,7 +890,7 @@ declare namespace chrome {
|
|
|
890
890
|
/**
|
|
891
891
|
* Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. **Note:** Currently, only 'title' and 'url' are supported.
|
|
892
892
|
*
|
|
893
|
-
* Can return its result via Promise since Chrome
|
|
893
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 90.
|
|
894
894
|
*/
|
|
895
895
|
function update(id: string, changes: UpdateChanges): Promise<BookmarkTreeNode>;
|
|
896
896
|
function update(id: string, changes: UpdateChanges, callback: (result: BookmarkTreeNode) => void): void;
|
|
@@ -965,7 +965,7 @@ declare namespace chrome {
|
|
|
965
965
|
interface TitleDetails {
|
|
966
966
|
/** The string the browser action should display when moused over. */
|
|
967
967
|
title: string;
|
|
968
|
-
/**
|
|
968
|
+
/** Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
|
|
969
969
|
tabId?: number | null | undefined;
|
|
970
970
|
}
|
|
971
971
|
|
|
@@ -1126,7 +1126,10 @@ declare namespace chrome {
|
|
|
1126
1126
|
downloads?: boolean | undefined;
|
|
1127
1127
|
/** The browser's cache. */
|
|
1128
1128
|
cache?: boolean | undefined;
|
|
1129
|
-
/**
|
|
1129
|
+
/**
|
|
1130
|
+
* Cache storage.
|
|
1131
|
+
* @since Chrome 72
|
|
1132
|
+
*/
|
|
1130
1133
|
cacheStorage?: boolean | undefined;
|
|
1131
1134
|
/**
|
|
1132
1135
|
* Websites' appcaches.
|
|
@@ -1170,7 +1173,7 @@ declare namespace chrome {
|
|
|
1170
1173
|
* Clears plugins' data.
|
|
1171
1174
|
*
|
|
1172
1175
|
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
|
1173
|
-
* @deprecated since Chrome 88. Support for Flash has been removed. This function has no effect
|
|
1176
|
+
* @deprecated since Chrome 88. Support for Flash has been removed. This function has no effect.
|
|
1174
1177
|
*/
|
|
1175
1178
|
function removePluginData(options: RemovalOptions): Promise<void>;
|
|
1176
1179
|
function removePluginData(options: RemovalOptions, callback: () => void): void;
|
|
@@ -1300,12 +1303,15 @@ declare namespace chrome {
|
|
|
1300
1303
|
/**
|
|
1301
1304
|
* Use this API to expose certificates to the platform which can use these certificates for TLS authentications.
|
|
1302
1305
|
*
|
|
1303
|
-
*
|
|
1306
|
+
* Permissions: "certificateProvider"
|
|
1304
1307
|
* @platform ChromeOS only
|
|
1305
1308
|
* @since Chrome 46
|
|
1306
1309
|
*/
|
|
1307
1310
|
export namespace certificateProvider {
|
|
1308
|
-
/**
|
|
1311
|
+
/**
|
|
1312
|
+
* Types of supported cryptographic signature algorithms.
|
|
1313
|
+
* @since Chrome 86
|
|
1314
|
+
*/
|
|
1309
1315
|
enum Algorithm {
|
|
1310
1316
|
/**
|
|
1311
1317
|
* Specifies the RSASSA PKCS#1 v1.5 signature algorithm with the MD5-SHA-1 hashing. The extension must not prepend a DigestInfo prefix but only add PKCS#1 padding.
|
|
@@ -1478,7 +1484,7 @@ declare namespace chrome {
|
|
|
1478
1484
|
*
|
|
1479
1485
|
* The extension must eventually call this function for every {@link onSignatureRequested} event; the API implementation will stop waiting for this call after some time and respond with a timeout error when this function is called.
|
|
1480
1486
|
*
|
|
1481
|
-
* Can return its result via Promise since Chrome 96.
|
|
1487
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
|
1482
1488
|
* @since Chrome 86
|
|
1483
1489
|
*/
|
|
1484
1490
|
function reportSignature(details: ReportSignatureDetails): Promise<void>;
|
|
@@ -1487,7 +1493,7 @@ declare namespace chrome {
|
|
|
1487
1493
|
/**
|
|
1488
1494
|
* Requests the PIN from the user. Only one ongoing request at a time is allowed. The requests issued while another flow is ongoing are rejected. It's the extension's responsibility to try again later if another flow is in progress.
|
|
1489
1495
|
*
|
|
1490
|
-
* Can return its result via Promise since Chrome 96.
|
|
1496
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
|
1491
1497
|
* @param details Contains the details about the requested dialog.
|
|
1492
1498
|
* @since Chrome 57
|
|
1493
1499
|
*/
|
|
@@ -1502,7 +1508,7 @@ declare namespace chrome {
|
|
|
1502
1508
|
*
|
|
1503
1509
|
* The extension should call this function after initialization and on every change in the set of currently available certificates. The extension should also call this function in response to {@link onCertificatesUpdateRequested} every time this event is received.
|
|
1504
1510
|
*
|
|
1505
|
-
* Can return its result via Promise since Chrome 96.
|
|
1511
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
|
1506
1512
|
* @param details The certificates to set. Invalid certificates will be ignored.
|
|
1507
1513
|
* @since Chrome 86
|
|
1508
1514
|
*/
|
|
@@ -1512,7 +1518,7 @@ declare namespace chrome {
|
|
|
1512
1518
|
/**
|
|
1513
1519
|
* Stops the pin request started by the {@link requestPin} function.
|
|
1514
1520
|
*
|
|
1515
|
-
* Can return its result via Promise since Chrome 96.
|
|
1521
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
|
1516
1522
|
* @param details Contains the details about the reason for stopping the request flow.
|
|
1517
1523
|
* @since Chrome 57
|
|
1518
1524
|
*/
|
|
@@ -1631,7 +1637,7 @@ declare namespace chrome {
|
|
|
1631
1637
|
/**
|
|
1632
1638
|
* Clear all content setting rules set by this extension.
|
|
1633
1639
|
*
|
|
1634
|
-
* Can return its result via Promise since Chrome 96.
|
|
1640
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
|
1635
1641
|
*/
|
|
1636
1642
|
clear(details: ContentSettingClearParams): Promise<void>;
|
|
1637
1643
|
clear(details: ContentSettingClearParams, callback: () => void): void;
|
|
@@ -1639,19 +1645,19 @@ declare namespace chrome {
|
|
|
1639
1645
|
/**
|
|
1640
1646
|
* Gets the current content setting for a given pair of URLs.
|
|
1641
1647
|
*
|
|
1642
|
-
* Can return its result via Promise since Chrome 96.
|
|
1648
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
|
1643
1649
|
*/
|
|
1644
1650
|
get(details: ContentSettingGetParams): Promise<ContentSettingGetResult<T>>;
|
|
1645
1651
|
get(details: ContentSettingGetParams, callback: (details: ContentSettingGetResult<T>) => void): void;
|
|
1646
1652
|
|
|
1647
|
-
/** Can return its result via Promise since Chrome 96. */
|
|
1653
|
+
/** Can return its result via Promise in Manifest V3 or later since Chrome 96. */
|
|
1648
1654
|
getResourceIdentifiers(): Promise<ResourceIdentifier[] | undefined>;
|
|
1649
1655
|
getResourceIdentifiers(callback: (resourceIdentifiers?: ResourceIdentifier[]) => void): void;
|
|
1650
1656
|
|
|
1651
1657
|
/**
|
|
1652
1658
|
* Applies a new content setting rule.
|
|
1653
1659
|
*
|
|
1654
|
-
* Can return its result via Promise since Chrome 96.
|
|
1660
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
|
1655
1661
|
*/
|
|
1656
1662
|
set(details: ContentSettingSetParams<T>): Promise<void>;
|
|
1657
1663
|
set(details: ContentSettingSetParams<T>, callback: () => void): void;
|
|
@@ -1730,7 +1736,7 @@ declare namespace chrome {
|
|
|
1730
1736
|
BLOCK = "block",
|
|
1731
1737
|
}
|
|
1732
1738
|
|
|
1733
|
-
/** The only content type using resource identifiers is contentSettings.plugins. For more information, see Resource Identifiers. */
|
|
1739
|
+
/** The only content type using resource identifiers is {@link contentSettings.plugins}. For more information, see Resource Identifiers. */
|
|
1734
1740
|
interface ResourceIdentifier {
|
|
1735
1741
|
/** A human readable description of the resource. */
|
|
1736
1742
|
description?: string;
|
|
@@ -1958,7 +1964,7 @@ declare namespace chrome {
|
|
|
1958
1964
|
BROWSER_ACTION = "browser_action",
|
|
1959
1965
|
PAGE_ACTION = "page_action",
|
|
1960
1966
|
ACTION = "action",
|
|
1961
|
-
/** @since Chrome
|
|
1967
|
+
/** @since Chrome 150 */
|
|
1962
1968
|
TAB = "tab",
|
|
1963
1969
|
}
|
|
1964
1970
|
|
|
@@ -1966,37 +1972,48 @@ declare namespace chrome {
|
|
|
1966
1972
|
* Properties of the new context menu item.
|
|
1967
1973
|
* @since Chrome 123
|
|
1968
1974
|
*/
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
1975
|
+
type CreateProperties =
|
|
1976
|
+
& ({
|
|
1977
|
+
/** The initial state of a checkbox or radio button: `true` for selected, `false` for unselected. Only one radio button can be selected at a time in a given group. */
|
|
1978
|
+
checked?: boolean;
|
|
1979
|
+
/** List of contexts this menu item will appear in. Defaults to `['page']`. */
|
|
1980
|
+
contexts?: [`${ContextType}`, ...`${ContextType}`[]];
|
|
1981
|
+
/** Restricts the item to apply only to documents or frames whose URL matches one of the given patterns. For details on pattern formats, see Match Patterns. */
|
|
1982
|
+
documentUrlPatterns?: string[];
|
|
1983
|
+
/** Whether this context menu item is enabled or disabled. Defaults to `true`. */
|
|
1984
|
+
enabled?: boolean;
|
|
1985
|
+
/** The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension. */
|
|
1986
|
+
id?: string;
|
|
1987
|
+
/** The ID of a parent menu item; this makes the item a child of a previously added item. */
|
|
1988
|
+
parentId?: number | string;
|
|
1989
|
+
/** Similar to `documentUrlPatterns`, filters based on the `src` attribute of `img`, `audio`, and `video` tags and the `href` attribute of `a` tags. */
|
|
1990
|
+
targetUrlPatterns?: string[];
|
|
1991
|
+
/** Whether the item is visible in the menu. */
|
|
1992
|
+
visible?: boolean;
|
|
1993
|
+
/**
|
|
1994
|
+
* A function that is called back when the menu item is clicked. This is not available inside of a service worker; instead, you should register a listener for {@link contextMenus.onClicked}.
|
|
1995
|
+
* @param info Information about the item clicked and the context where the click happened.
|
|
1996
|
+
* @param tab The details of the tab where the click took place. This parameter is not present for platform apps.
|
|
1997
|
+
*/
|
|
1998
|
+
onclick?: (
|
|
1999
|
+
info: OnClickData,
|
|
2000
|
+
tab: tabs.Tab,
|
|
2001
|
+
) => void;
|
|
2002
|
+
})
|
|
2003
|
+
& (
|
|
2004
|
+
| {
|
|
2005
|
+
/** The type of menu item. Defaults to `normal`. */
|
|
2006
|
+
type: `${ItemType.SEPARATOR}`;
|
|
2007
|
+
/** The text to display in the item; this is _required_ unless `type` is `separator`. When the context is `selection`, use `%s` within the string to show the selected text. For example, if this parameter's value is "Translate '%s' to Pig Latin" and the user selects the word "cool", the context menu item for the selection is "Translate 'cool' to Pig Latin". */
|
|
2008
|
+
title?: string;
|
|
2009
|
+
}
|
|
2010
|
+
| {
|
|
2011
|
+
/** The type of menu item. Defaults to `normal`. */
|
|
2012
|
+
type?: `${Exclude<ItemType, ItemType.SEPARATOR>}`;
|
|
2013
|
+
/** The text to display in the item; this is _required_ unless `type` is `separator`. When the context is `selection`, use `%s` within the string to show the selected text. For example, if this parameter's value is "Translate '%s' to Pig Latin" and the user selects the word "cool", the context menu item for the selection is "Translate 'cool' to Pig Latin". */
|
|
2014
|
+
title: string;
|
|
2015
|
+
}
|
|
2016
|
+
);
|
|
2000
2017
|
|
|
2001
2018
|
/**
|
|
2002
2019
|
* The type of menu item.
|
|
@@ -2053,7 +2070,7 @@ declare namespace chrome {
|
|
|
2053
2070
|
* Removes a context menu item.
|
|
2054
2071
|
* @param menuItemId The ID of the context menu item to remove.
|
|
2055
2072
|
*
|
|
2056
|
-
* Can return its result via Promise since Chrome 123.
|
|
2073
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 123.
|
|
2057
2074
|
*/
|
|
2058
2075
|
function remove(menuItemId: string | number): Promise<void>;
|
|
2059
2076
|
function remove(menuItemId: string | number, callback: () => void): void;
|
|
@@ -2061,7 +2078,7 @@ declare namespace chrome {
|
|
|
2061
2078
|
/**
|
|
2062
2079
|
* Removes all context menu items added by this extension.
|
|
2063
2080
|
*
|
|
2064
|
-
* Can return its result via Promise since Chrome 123.
|
|
2081
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 123.
|
|
2065
2082
|
*/
|
|
2066
2083
|
function removeAll(): Promise<void>;
|
|
2067
2084
|
function removeAll(callback: () => void): void;
|
|
@@ -2071,7 +2088,7 @@ declare namespace chrome {
|
|
|
2071
2088
|
* @param id The ID of the item to update.
|
|
2072
2089
|
* @param updateProperties The properties to update. Accepts the same values as the {@link contextMenus.create} function.
|
|
2073
2090
|
*
|
|
2074
|
-
* Can return its result via Promise since Chrome 123.
|
|
2091
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 123.
|
|
2075
2092
|
*/
|
|
2076
2093
|
function update(id: string | number, updateProperties: Omit<CreateProperties, "id">): Promise<void>;
|
|
2077
2094
|
function update(
|
|
@@ -2095,7 +2112,10 @@ declare namespace chrome {
|
|
|
2095
2112
|
* Manifest: "host_permissions"
|
|
2096
2113
|
*/
|
|
2097
2114
|
export namespace cookies {
|
|
2098
|
-
/**
|
|
2115
|
+
/**
|
|
2116
|
+
* A cookie's 'SameSite' state (https://tools.ietf.org/html/draft-west-first-party-cookies). 'no_restriction' corresponds to a cookie set with 'SameSite=None', 'lax' to 'SameSite=Lax', and 'strict' to 'SameSite=Strict'. 'unspecified' corresponds to a cookie set without the SameSite attribute.
|
|
2117
|
+
* @since Chrome 51
|
|
2118
|
+
*/
|
|
2099
2119
|
enum SameSiteStatus {
|
|
2100
2120
|
NO_RESTRICTION = "no_restriction",
|
|
2101
2121
|
LAX = "lax",
|
|
@@ -2248,7 +2268,7 @@ declare namespace chrome {
|
|
|
2248
2268
|
documentId?: string | undefined;
|
|
2249
2269
|
/** The unique identifier for the frame within the tab. */
|
|
2250
2270
|
frameId?: number | undefined;
|
|
2251
|
-
|
|
2271
|
+
/** The unique identifier for the tab containing the frame. */
|
|
2252
2272
|
tabId?: number | undefined;
|
|
2253
2273
|
}
|
|
2254
2274
|
|
|
@@ -2286,7 +2306,7 @@ declare namespace chrome {
|
|
|
2286
2306
|
|
|
2287
2307
|
/**
|
|
2288
2308
|
* Retrieves all cookies from a single cookie store that match the given information. The cookies returned will be sorted, with those with the longest path first. If multiple cookies have the same path length, those with the earliest creation time will be first. This method only retrieves cookies for domains that the extension has host permissions to
|
|
2289
|
-
* @param details Information to
|
|
2309
|
+
* @param details Information to filter the cookies being retrieved.
|
|
2290
2310
|
*
|
|
2291
2311
|
* Can return its result via Promise in Manifest V3 or later.
|
|
2292
2312
|
*/
|
|
@@ -2500,7 +2520,7 @@ declare namespace chrome {
|
|
|
2500
2520
|
* A declarative event action that sets the extension's toolbar {@link action} to an enabled state while the corresponding conditions are met. This action can be used without host permissions. If the extension has the `activeTab` permission, clicking the page action grants access to the active tab.
|
|
2501
2521
|
*
|
|
2502
2522
|
* On pages where the conditions are not met the extension's toolbar action will be grey-scale, and clicking it will open the context menu, instead of triggering the action.
|
|
2503
|
-
* @since
|
|
2523
|
+
* @since Chrome 97
|
|
2504
2524
|
*/
|
|
2505
2525
|
class ShowAction {}
|
|
2506
2526
|
|
|
@@ -2508,8 +2528,7 @@ declare namespace chrome {
|
|
|
2508
2528
|
* A declarative event action that sets the extension's {@link pageAction} to an enabled state while the corresponding conditions are met. This action can be used without host permissions, but the extension must have a page action. If the extension has the `activeTab` permission, clicking the page action grants access to the active tab.
|
|
2509
2529
|
*
|
|
2510
2530
|
* On pages where the conditions are not met the extension's toolbar action will be grey-scale, and clicking it will open the context menu, instead of triggering the action.
|
|
2511
|
-
*
|
|
2512
|
-
* MV2 only
|
|
2531
|
+
* @deprecated since Chrome 97. Please use {@link declarativeContent.ShowAction}.
|
|
2513
2532
|
*/
|
|
2514
2533
|
class ShowPageAction {}
|
|
2515
2534
|
|
|
@@ -2747,6 +2766,7 @@ declare namespace chrome {
|
|
|
2747
2766
|
|
|
2748
2767
|
/** Adds a cookie to the request or overrides a cookie, in case another cookie of the same name exists already. Note that it is preferred to use the Cookies API because this is computationally less expensive. */
|
|
2749
2768
|
interface AddRequestCookie {
|
|
2769
|
+
/** Cookie to be added to the request. No field may be undefined. */
|
|
2750
2770
|
cookie: RequestCookie;
|
|
2751
2771
|
}
|
|
2752
2772
|
|
|
@@ -2793,6 +2813,7 @@ declare namespace chrome {
|
|
|
2793
2813
|
url: string;
|
|
2794
2814
|
}
|
|
2795
2815
|
|
|
2816
|
+
/** Triggers the {@link declarativeWebRequest.onMessage} event. */
|
|
2796
2817
|
interface SendMessageToExtension {
|
|
2797
2818
|
/** The value that will be passed in the message attribute of the dictionary that is passed to the event handler. */
|
|
2798
2819
|
message: string;
|
|
@@ -3491,9 +3512,9 @@ declare namespace chrome {
|
|
|
3491
3512
|
WRONG_TYPE = "WRONG_TYPE",
|
|
3492
3513
|
/** No more data is available. */
|
|
3493
3514
|
EOF = "EOF",
|
|
3494
|
-
/** The document feeder is jammed */
|
|
3515
|
+
/** The document feeder is jammed. */
|
|
3495
3516
|
ADF_JAMMED = "ADF_JAMMED",
|
|
3496
|
-
/** The document feeder is empty */
|
|
3517
|
+
/** The document feeder is empty. */
|
|
3497
3518
|
ADF_EMPTY = "ADF_EMPTY",
|
|
3498
3519
|
/** The flatbed cover is open. */
|
|
3499
3520
|
COVER_OPEN = "COVER_OPEN",
|
|
@@ -3545,7 +3566,7 @@ declare namespace chrome {
|
|
|
3545
3566
|
enum OptionType {
|
|
3546
3567
|
/** The option's data type is `unknown`. The value property will be unset. */
|
|
3547
3568
|
UNKNOWN = "UNKNOWN",
|
|
3548
|
-
/** The `value` property will be one of `true` false
|
|
3569
|
+
/** The `value` property will be one of `true` or `false`. */
|
|
3549
3570
|
BOOL = "BOOL",
|
|
3550
3571
|
/** A signed 32-bit integer. The `value` property will be long or long[], depending on whether the option takes more than one value. */
|
|
3551
3572
|
INT = "INT",
|
|
@@ -3753,7 +3774,7 @@ declare namespace chrome {
|
|
|
3753
3774
|
/**
|
|
3754
3775
|
* Reads the next chunk of available image data from an active job handle, and returns a Promise that resolves with a {@link ReadScanDataResponse} object. If a callback is used, the object is passed to it instead.
|
|
3755
3776
|
*
|
|
3756
|
-
* **Note:**It is valid for a response result to be `SUCCESS` with a zero-length `data` member. This means the scanner is still working but does not yet have additional data ready. The caller should wait a short time and try again.
|
|
3777
|
+
* **Note:** It is valid for a response result to be `SUCCESS` with a zero-length `data` member. This means the scanner is still working but does not yet have additional data ready. The caller should wait a short time and try again.
|
|
3757
3778
|
*
|
|
3758
3779
|
* When the scan job completes, the response will have the result value of `EOF`. This response may contain a final non-zero `data` member.
|
|
3759
3780
|
* @param job Active job handle previously returned from {@link startScan}.
|
|
@@ -3813,9 +3834,9 @@ declare namespace chrome {
|
|
|
3813
3834
|
*/
|
|
3814
3835
|
export namespace dom {
|
|
3815
3836
|
/**
|
|
3816
|
-
* @since Chrome 88
|
|
3817
3837
|
* Requests chrome to return the open/closed shadow roots else return null.
|
|
3818
3838
|
* @param element reference of HTMLElement.
|
|
3839
|
+
* @since Chrome 88
|
|
3819
3840
|
*/
|
|
3820
3841
|
function openOrClosedShadowRoot(element: HTMLElement): ShadowRoot | null;
|
|
3821
3842
|
}
|
|
@@ -4050,12 +4071,28 @@ declare namespace chrome {
|
|
|
4050
4071
|
size?: 16 | 32 | undefined;
|
|
4051
4072
|
}
|
|
4052
4073
|
|
|
4074
|
+
type DownloadSortableKey = keyof Pick<
|
|
4075
|
+
DownloadItem,
|
|
4076
|
+
| "url"
|
|
4077
|
+
| "bytesReceived"
|
|
4078
|
+
| "danger"
|
|
4079
|
+
| "finalUrl"
|
|
4080
|
+
| "totalBytes"
|
|
4081
|
+
| "filename"
|
|
4082
|
+
| "paused"
|
|
4083
|
+
| "state"
|
|
4084
|
+
| "mime"
|
|
4085
|
+
| "startTime"
|
|
4086
|
+
| "endTime"
|
|
4087
|
+
| "exists"
|
|
4088
|
+
>;
|
|
4089
|
+
|
|
4053
4090
|
interface DownloadQuery {
|
|
4054
4091
|
/** Set elements of this array to {@link DownloadItem} properties in order to sort search results. For example, setting `orderBy=['startTime']` sorts the {@link DownloadItem} by their start time in ascending order. To specify descending order, prefix with a hyphen: '-startTime'. */
|
|
4055
|
-
orderBy?:
|
|
4092
|
+
orderBy?: Array<DownloadSortableKey | `-${DownloadSortableKey}`> | undefined;
|
|
4056
4093
|
/** Limits results to {@link DownloadItem} whose `url` matches the given regular expression. */
|
|
4057
4094
|
urlRegex?: string | undefined;
|
|
4058
|
-
/** Limits results to {@link DownloadItem} that ended before the
|
|
4095
|
+
/** Limits results to {@link DownloadItem} that ended before the given ms in ISO 8601 format. */
|
|
4059
4096
|
endedBefore?: string | undefined;
|
|
4060
4097
|
/** Limits results to {@link DownloadItem} whose `totalBytes` is greater than the given integer. */
|
|
4061
4098
|
totalBytesGreater?: number | undefined;
|
|
@@ -4071,12 +4108,12 @@ declare namespace chrome {
|
|
|
4071
4108
|
* The absolute URL that this download is being made from, after all redirects.
|
|
4072
4109
|
* @since Chrome 54
|
|
4073
4110
|
*/
|
|
4074
|
-
finalUrl?: string;
|
|
4111
|
+
finalUrl?: string | undefined;
|
|
4075
4112
|
/**
|
|
4076
4113
|
* Limits results to {@link DownloadItem} whose `finalUrl` matches the given regular expression.
|
|
4077
4114
|
* @since Chrome 54
|
|
4078
4115
|
*/
|
|
4079
|
-
finalUrlRegex?: string;
|
|
4116
|
+
finalUrlRegex?: string | undefined;
|
|
4080
4117
|
/** This array of search terms limits results to {@link DownloadItem} whose `filename` or `url` or `finalUrl` contain all of the search terms that do not begin with a dash '-' and none of the search terms that do begin with a dash. */
|
|
4081
4118
|
query?: string[] | undefined;
|
|
4082
4119
|
/** Limits results to {@link DownloadItem} whose `totalBytes` is less than the given integer. */
|
|
@@ -4085,13 +4122,13 @@ declare namespace chrome {
|
|
|
4085
4122
|
id?: number | undefined;
|
|
4086
4123
|
/** Number of bytes received so far from the host, without considering file compression. */
|
|
4087
4124
|
bytesReceived?: number | undefined;
|
|
4088
|
-
/** Limits results to {@link DownloadItem} that ended after the
|
|
4125
|
+
/** Limits results to {@link DownloadItem} that ended after the given ms in ISO 8601 format. */
|
|
4089
4126
|
endedAfter?: string | undefined;
|
|
4090
4127
|
/** Absolute local path. */
|
|
4091
4128
|
filename?: string | undefined;
|
|
4092
4129
|
/** Indicates whether the download is progressing, interrupted, or complete. */
|
|
4093
4130
|
state?: `${State}` | undefined;
|
|
4094
|
-
/** Limits results to {@link DownloadItem} that started after the
|
|
4131
|
+
/** Limits results to {@link DownloadItem} that started after the given ms in ISO 8601 format. */
|
|
4095
4132
|
startedAfter?: string | undefined;
|
|
4096
4133
|
/** The file's MIME type. */
|
|
4097
4134
|
mime?: string | undefined;
|
|
@@ -4101,7 +4138,7 @@ declare namespace chrome {
|
|
|
4101
4138
|
startTime?: string | undefined;
|
|
4102
4139
|
/** The absolute URL that this download initiated from, before any redirects. */
|
|
4103
4140
|
url?: string | undefined;
|
|
4104
|
-
/** Limits results to {@link DownloadItem} that started before the
|
|
4141
|
+
/** Limits results to {@link DownloadItem} that started before the given ms in ISO 8601 format. */
|
|
4105
4142
|
startedBefore?: string | undefined;
|
|
4106
4143
|
/** The maximum number of matching {@link DownloadItem} returned. Defaults to 1000. Set to 0 in order to return all matching {@link DownloadItem}. See {@link search} for how to page through results. */
|
|
4107
4144
|
limit?: number | undefined;
|
|
@@ -4153,7 +4190,7 @@ declare namespace chrome {
|
|
|
4153
4190
|
function getFileIcon(downloadId: number, callback: (iconURL?: string) => void): void;
|
|
4154
4191
|
function getFileIcon(
|
|
4155
4192
|
downloadId: number,
|
|
4156
|
-
options: GetFileIconOptions,
|
|
4193
|
+
options: GetFileIconOptions | undefined,
|
|
4157
4194
|
callback: (iconURL?: string) => void,
|
|
4158
4195
|
): void;
|
|
4159
4196
|
|
|
@@ -4239,9 +4276,10 @@ declare namespace chrome {
|
|
|
4239
4276
|
|
|
4240
4277
|
/**
|
|
4241
4278
|
* Change the download UI of every window associated with the current browser profile. As long as at least one extension has set {@link UiOptions.enabled} to false, the download UI will be hidden. Setting {@link UiOptions.enabled} to true while at least one other extension has disabled it will return an error through {@link runtime.lastError}. Requires the `"downloads.ui"` permission in addition to the `"downloads"` permission.
|
|
4242
|
-
* @
|
|
4279
|
+
* @param options Encapsulate a change to the download UI.
|
|
4243
4280
|
*
|
|
4244
4281
|
* Can return its result via Promise in Manifest V3 or later since Chrome 105.
|
|
4282
|
+
* @since Chrome 105
|
|
4245
4283
|
*/
|
|
4246
4284
|
function setUiOptions(options: UiOptions): Promise<void>;
|
|
4247
4285
|
function setUiOptions(options: UiOptions, callback: () => void): void;
|
|
@@ -4290,7 +4328,7 @@ declare namespace chrome {
|
|
|
4290
4328
|
/**
|
|
4291
4329
|
* Implements the WebCrypto's SubtleCrypto interface. The cryptographic operations, including key generation, are software-backed. Protection of the keys, and thus implementation of the non-extractable property, is done in software, so the keys are less protected than hardware-backed keys.
|
|
4292
4330
|
*
|
|
4293
|
-
* Only non-extractable keys can be generated. The only supported key type is RSASSA-PKCS1-V1_5 with `modulusLength` up to 2048.
|
|
4331
|
+
* Only non-extractable keys can be generated. The only supported key type is RSASSA-PKCS1-V1_5 with `modulusLength` up to 2048. Each key can be used for signing data at most once, unless the extension is allowlisted through the KeyPermissions policy, in which case the key can be used indefinitely.
|
|
4294
4332
|
*
|
|
4295
4333
|
* Keys generated on a specific `Token` cannot be used with any other Tokens, nor can they be used with `window.crypto.subtle`. Equally, `Key` objects created with `window.crypto.subtle` cannot be used with this interface.
|
|
4296
4334
|
* @since Chrome 97
|
|
@@ -4437,6 +4475,8 @@ declare namespace chrome {
|
|
|
4437
4475
|
* @param challenge A challenge as emitted by the Verified Access Web API.
|
|
4438
4476
|
* @param registerKey If set, the current Enterprise User Key is registered with the `user` token and relinquishes the Enterprise User Key role. The key can then be associated with a certificate and used like any other signing key. This key is 2048-bit RSA. Subsequent calls to this function will then generate a new Enterprise User Key.
|
|
4439
4477
|
* @param callback Called back with the challenge response.
|
|
4478
|
+
*
|
|
4479
|
+
* Can return its result via Promise since Chrome 131.
|
|
4440
4480
|
* @since Chrome 50
|
|
4441
4481
|
*/
|
|
4442
4482
|
function challengeUserKey(challenge: ArrayBuffer, registerKey: boolean): Promise<ArrayBuffer>;
|
|
@@ -4564,9 +4604,9 @@ declare namespace chrome {
|
|
|
4564
4604
|
interface NetworkDetails {
|
|
4565
4605
|
/** The device's MAC address. */
|
|
4566
4606
|
macAddress: string;
|
|
4567
|
-
/**
|
|
4607
|
+
/** The device's local IPv4 address (undefined if not configured). */
|
|
4568
4608
|
ipv4?: string | undefined;
|
|
4569
|
-
/**
|
|
4609
|
+
/** The device's local IPv6 address (undefined if not configured). */
|
|
4570
4610
|
ipv6?: string | undefined;
|
|
4571
4611
|
}
|
|
4572
4612
|
|
|
@@ -4739,6 +4779,8 @@ declare namespace chrome {
|
|
|
4739
4779
|
|
|
4740
4780
|
/**
|
|
4741
4781
|
* Set for the lifetime of a callback if an asynchronous extension api has resulted in an error. If no error has occurred lastError will be `undefined`.
|
|
4782
|
+
*
|
|
4783
|
+
* MV2 only
|
|
4742
4784
|
* @deprecated since Chrome 58. Please use {@link runtime.lastError}
|
|
4743
4785
|
*/
|
|
4744
4786
|
const lastError: runtime.LastError | undefined;
|
|
@@ -4748,6 +4790,8 @@ declare namespace chrome {
|
|
|
4748
4790
|
|
|
4749
4791
|
/**
|
|
4750
4792
|
* Converts a relative path within an extension install directory to a fully-qualified URL.
|
|
4793
|
+
*
|
|
4794
|
+
* MV2 only
|
|
4751
4795
|
* @param path A path to a resource within an extension expressed relative to its install directory.
|
|
4752
4796
|
* @deprecated since Chrome 58. Please use {@link runtime.getURL}
|
|
4753
4797
|
*/
|
|
@@ -4952,6 +4996,8 @@ declare namespace chrome {
|
|
|
4952
4996
|
* Use the `chrome.fileSystemProvider` API to create file systems, that can be accessible from the file manager on Chrome OS.
|
|
4953
4997
|
*
|
|
4954
4998
|
* Permissions: "fileSystemProvider"
|
|
4999
|
+
*
|
|
5000
|
+
* Manifest: "fileSystemProvider"
|
|
4955
5001
|
* @platform ChromeOS only
|
|
4956
5002
|
*/
|
|
4957
5003
|
export namespace fileSystemProvider {
|
|
@@ -5258,7 +5304,7 @@ declare namespace chrome {
|
|
|
5258
5304
|
filePath: string;
|
|
5259
5305
|
/** Whether the file was opened for reading or writing. */
|
|
5260
5306
|
mode: `${OpenFileMode}`;
|
|
5261
|
-
/** A request ID to be
|
|
5307
|
+
/** A request ID to be used by consecutive read/write and close requests. */
|
|
5262
5308
|
openRequestId: number;
|
|
5263
5309
|
}
|
|
5264
5310
|
|
|
@@ -5447,7 +5493,7 @@ declare namespace chrome {
|
|
|
5447
5493
|
*
|
|
5448
5494
|
* Note that if a parent directory is removed, then all descendant entries are also removed, and if they are watched, then the API must be notified about the fact. Also, if a directory is renamed, then all descendant entries are in fact removed, as there is no entry under their original paths anymore.
|
|
5449
5495
|
*
|
|
5450
|
-
* In case of an error, {@link runtime.lastError} will be set
|
|
5496
|
+
* In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
|
|
5451
5497
|
*
|
|
5452
5498
|
* Can return its result via Promise since Chrome 96.
|
|
5453
5499
|
* @since Chrome 45
|
|
@@ -5550,7 +5596,7 @@ declare namespace chrome {
|
|
|
5550
5596
|
>;
|
|
5551
5597
|
|
|
5552
5598
|
/**
|
|
5553
|
-
* Raised when executing an action for a set of files or directories is
|
|
5599
|
+
* Raised when executing an action for a set of files or directories is requested. After the action is completed, `successCallback` must be called. On error, `errorCallback` must be called.
|
|
5554
5600
|
* @since Chrome 48
|
|
5555
5601
|
*/
|
|
5556
5602
|
const onExecuteActionRequested: events.Event<
|
|
@@ -5931,7 +5977,7 @@ declare namespace chrome {
|
|
|
5931
5977
|
genericFamily: `${GenericFamily}`;
|
|
5932
5978
|
/** The level of control this extension has over the setting. */
|
|
5933
5979
|
levelOfControl: `${LevelOfControl}`;
|
|
5934
|
-
/**
|
|
5980
|
+
/** The script code for which the font setting has changed. */
|
|
5935
5981
|
script?: `${ScriptCode}`;
|
|
5936
5982
|
/** The font ID. See the description in {@link getFont}. */
|
|
5937
5983
|
fontId: string;
|
|
@@ -6136,7 +6182,7 @@ declare namespace chrome {
|
|
|
6136
6182
|
function register(senderIds: string[], callback: (registrationId: string) => void): void;
|
|
6137
6183
|
|
|
6138
6184
|
/**
|
|
6139
|
-
*
|
|
6185
|
+
* Unregisters the application from FCM.
|
|
6140
6186
|
*
|
|
6141
6187
|
* Can return its result via Promise in Manifest V3 or later since Chrome 116.
|
|
6142
6188
|
*/
|
|
@@ -6194,7 +6240,7 @@ declare namespace chrome {
|
|
|
6194
6240
|
/** The transition type for this visit from its referrer. */
|
|
6195
6241
|
transition: `${TransitionType}`;
|
|
6196
6242
|
/**
|
|
6197
|
-
* True if the visit originated on this device. False if it was synced from a different device
|
|
6243
|
+
* True if the visit originated on this device. False if it was synced from a different device.
|
|
6198
6244
|
* @since Chrome 115
|
|
6199
6245
|
*/
|
|
6200
6246
|
isLocal: boolean;
|
|
@@ -6569,7 +6615,7 @@ declare namespace chrome {
|
|
|
6569
6615
|
* For a good user experience it is important interactive auth flows are initiated by UI in your app explaining what the authorization is for. Failing to do this will cause your users to get authorization requests with no context. In particular, do not launch an interactive auth flow when your app is first launched.
|
|
6570
6616
|
* @param details WebAuth flow options.
|
|
6571
6617
|
*
|
|
6572
|
-
* Can return its result via Promise since Chrome 106
|
|
6618
|
+
* Can return its result via Promise since Chrome 106.
|
|
6573
6619
|
*/
|
|
6574
6620
|
function launchWebAuthFlow(details: WebAuthFlowDetails): Promise<string | undefined>;
|
|
6575
6621
|
function launchWebAuthFlow(details: WebAuthFlowDetails, callback: (responseUrl?: string) => void): void;
|
|
@@ -6865,7 +6911,10 @@ declare namespace chrome {
|
|
|
6865
6911
|
COMPOSITION = "composition",
|
|
6866
6912
|
}
|
|
6867
6913
|
|
|
6868
|
-
/**
|
|
6914
|
+
/**
|
|
6915
|
+
* Type of assistive window.
|
|
6916
|
+
* @since Chrome 85
|
|
6917
|
+
*/
|
|
6869
6918
|
enum AssistiveWindowType {
|
|
6870
6919
|
UNDO = "undo",
|
|
6871
6920
|
}
|
|
@@ -7039,6 +7088,7 @@ declare namespace chrome {
|
|
|
7039
7088
|
* Shows/Hides an assistive window with the given properties.
|
|
7040
7089
|
*
|
|
7041
7090
|
* Can return its result via Promise in Manifest V3 or later since Chrome 111.
|
|
7091
|
+
* @since Chrome 85
|
|
7042
7092
|
*/
|
|
7043
7093
|
function setAssistiveWindowProperties(
|
|
7044
7094
|
parameters: AssistiveWindowPropertiesParameters,
|
|
@@ -7052,6 +7102,7 @@ declare namespace chrome {
|
|
|
7052
7102
|
* Highlights/Unhighlights a button in an assistive window.
|
|
7053
7103
|
*
|
|
7054
7104
|
* Can return its result via Promise in Manifest V3 or later since Chrome 111.
|
|
7105
|
+
* @since Chrome 86
|
|
7055
7106
|
*/
|
|
7056
7107
|
function setAssistiveWindowButtonHighlighted(
|
|
7057
7108
|
parameters: AssistiveWindowButtonHighlightedParameters,
|
|
@@ -7236,6 +7287,7 @@ declare namespace chrome {
|
|
|
7236
7287
|
authorizedEntity: string;
|
|
7237
7288
|
/**
|
|
7238
7289
|
* Allows including a small number of string key/value pairs that will be associated with the token and may be used in processing the request.
|
|
7290
|
+
* @since Chrome 46
|
|
7239
7291
|
* @deprecated since Chrome 89. `options` are deprecated and will be ignored.
|
|
7240
7292
|
*/
|
|
7241
7293
|
options?: { [key: string]: string };
|
|
@@ -7254,6 +7306,7 @@ declare namespace chrome {
|
|
|
7254
7306
|
function getToken(getTokenParams: GetTokenParams): Promise<string>;
|
|
7255
7307
|
function getToken(getTokenParams: GetTokenParams, callback: (token: string) => void): void;
|
|
7256
7308
|
|
|
7309
|
+
/** Fired when all the granted tokens need to be refreshed. */
|
|
7257
7310
|
const onTokenRefresh: events.Event<() => void>;
|
|
7258
7311
|
}
|
|
7259
7312
|
|
|
@@ -7390,7 +7443,7 @@ declare namespace chrome {
|
|
|
7390
7443
|
}
|
|
7391
7444
|
|
|
7392
7445
|
/**
|
|
7393
|
-
* How the extension was installed
|
|
7446
|
+
* How the extension was installed.
|
|
7394
7447
|
* @since Chrome 44
|
|
7395
7448
|
*/
|
|
7396
7449
|
enum ExtensionInstallType {
|
|
@@ -7584,6 +7637,8 @@ declare namespace chrome {
|
|
|
7584
7637
|
////////////////////
|
|
7585
7638
|
/**
|
|
7586
7639
|
* Use the `chrome.mimeHandler` API to handle MIME type streams in third-party extensions.
|
|
7640
|
+
*
|
|
7641
|
+
* Manifest: "mime_types_handler"
|
|
7587
7642
|
* @since Chrome 151, MV3
|
|
7588
7643
|
*/
|
|
7589
7644
|
export namespace mimeHandler {
|
|
@@ -7610,7 +7665,7 @@ declare namespace chrome {
|
|
|
7610
7665
|
/**
|
|
7611
7666
|
* Aborts current stream handling and hands the content off to the user agent's native handler. After this call the extension frame will be torn down; callers should not expect further execution.
|
|
7612
7667
|
*
|
|
7613
|
-
* Can return its result via Promise
|
|
7668
|
+
* Can return its result via Promise.
|
|
7614
7669
|
*/
|
|
7615
7670
|
function abortAndFallbackToNativeHandler(): Promise<void>;
|
|
7616
7671
|
function abortAndFallbackToNativeHandler(callback: () => void): void;
|
|
@@ -7619,12 +7674,16 @@ declare namespace chrome {
|
|
|
7619
7674
|
* Reads the persisted options for a MIME type. Returns defaults (enabled=true) if none have been stored.
|
|
7620
7675
|
* @param mimeType The MIME type whose options to read.
|
|
7621
7676
|
*
|
|
7622
|
-
* Can return its result via Promise
|
|
7677
|
+
* Can return its result via Promise.
|
|
7623
7678
|
*/
|
|
7624
7679
|
function getMimeHandlerOptions(mimeType: string): Promise<MimeHandlerOptions>;
|
|
7625
7680
|
function getMimeHandlerOptions(mimeType: string, callback: (options: MimeHandlerOptions) => void): void;
|
|
7626
7681
|
|
|
7627
|
-
/**
|
|
7682
|
+
/**
|
|
7683
|
+
* Retrieves stream information for the current MIME handler context. Must be called from within a MIME handler extension page.
|
|
7684
|
+
*
|
|
7685
|
+
* Can return its result via Promise.
|
|
7686
|
+
*/
|
|
7628
7687
|
function getStreamInfo(): Promise<StreamInfo>;
|
|
7629
7688
|
function getStreamInfo(callback: (info: StreamInfo) => void): void;
|
|
7630
7689
|
|
|
@@ -7633,7 +7692,7 @@ declare namespace chrome {
|
|
|
7633
7692
|
* @param mimeType The MIME type to configure.
|
|
7634
7693
|
* @param options The new options to use.
|
|
7635
7694
|
*
|
|
7636
|
-
* Can return its result via Promise
|
|
7695
|
+
* Can return its result via Promise.
|
|
7637
7696
|
*/
|
|
7638
7697
|
function setMimeHandlerOptions(mimeType: string, options: MimeHandlerOptions): Promise<void>;
|
|
7639
7698
|
function setMimeHandlerOptions(mimeType: string, options: MimeHandlerOptions, callback: () => void): void;
|
|
@@ -7750,7 +7809,7 @@ declare namespace chrome {
|
|
|
7750
7809
|
* Clears the specified notification.
|
|
7751
7810
|
* @param notificationId The id of the notification to be cleared. This is returned by {@link notifications.create} method.
|
|
7752
7811
|
*
|
|
7753
|
-
* Can return its result via Promise since Chrome 116
|
|
7812
|
+
* Can return its result via Promise since Chrome 116.
|
|
7754
7813
|
*/
|
|
7755
7814
|
function clear(notificationId: string): Promise<boolean>;
|
|
7756
7815
|
function clear(notificationId: string, callback: (wasCleared: boolean) => void): void;
|
|
@@ -7762,7 +7821,7 @@ declare namespace chrome {
|
|
|
7762
7821
|
* The `notificationId` parameter is required before Chrome 42.
|
|
7763
7822
|
* @param options Contents of the notification.
|
|
7764
7823
|
*
|
|
7765
|
-
* Can return its result via Promise since Chrome 116
|
|
7824
|
+
* Can return its result via Promise since Chrome 116.
|
|
7766
7825
|
*/
|
|
7767
7826
|
function create(notificationId: string, options: NotificationCreateOptions): Promise<string>;
|
|
7768
7827
|
function create(options: NotificationCreateOptions): Promise<string>;
|
|
@@ -7776,7 +7835,7 @@ declare namespace chrome {
|
|
|
7776
7835
|
/**
|
|
7777
7836
|
* Retrieves all the notifications of this app or extension.
|
|
7778
7837
|
*
|
|
7779
|
-
* Can return its result via Promise since Chrome 116
|
|
7838
|
+
* Can return its result via Promise since Chrome 116.
|
|
7780
7839
|
*/
|
|
7781
7840
|
function getAll(): Promise<{ [key: string]: true }>;
|
|
7782
7841
|
function getAll(callback: (notifications: { [key: string]: true }) => void): void;
|
|
@@ -7784,7 +7843,7 @@ declare namespace chrome {
|
|
|
7784
7843
|
/**
|
|
7785
7844
|
* Retrieves whether the user has enabled notifications from this app or extension.
|
|
7786
7845
|
*
|
|
7787
|
-
* Can return its result via Promise since Chrome 116
|
|
7846
|
+
* Can return its result via Promise since Chrome 116.
|
|
7788
7847
|
*/
|
|
7789
7848
|
function getPermissionLevel(): Promise<`${PermissionLevel}`>;
|
|
7790
7849
|
function getPermissionLevel(callback: (level: `${PermissionLevel}`) => void): void;
|
|
@@ -7794,7 +7853,7 @@ declare namespace chrome {
|
|
|
7794
7853
|
* @param notificationId The id of the notification to be updated. This is returned by {@link notifications.create} method.
|
|
7795
7854
|
* @param options Contents of the notification to update to.
|
|
7796
7855
|
*
|
|
7797
|
-
* Can return its result via Promise since Chrome 116
|
|
7856
|
+
* Can return its result via Promise since Chrome 116.
|
|
7798
7857
|
*/
|
|
7799
7858
|
function update(notificationId: string, options: NotificationOptions): Promise<boolean>;
|
|
7800
7859
|
function update(
|
|
@@ -7998,6 +8057,7 @@ declare namespace chrome {
|
|
|
7998
8057
|
title: string;
|
|
7999
8058
|
}
|
|
8000
8059
|
|
|
8060
|
+
/** @since Chrome 88 */
|
|
8001
8061
|
interface TabDetails {
|
|
8002
8062
|
/** The ID of the tab to query state for. */
|
|
8003
8063
|
tabId: number;
|
|
@@ -8118,8 +8178,10 @@ declare namespace chrome {
|
|
|
8118
8178
|
}
|
|
8119
8179
|
|
|
8120
8180
|
/**
|
|
8121
|
-
* Adds a host access request. Request will only be signaled to the user if extension can be granted access to the host in the request. Request will be reset on cross-origin navigation. When accepted, grants persistent access to the site’s top origin
|
|
8122
|
-
*
|
|
8181
|
+
* Adds a host access request. Request will only be signaled to the user if extension can be granted access to the host in the request. Request will be reset on cross-origin navigation. When accepted, grants persistent access to the site’s top origin.
|
|
8182
|
+
*
|
|
8183
|
+
* Can return its result via Promise.
|
|
8184
|
+
* @since Chrome 133, MV3
|
|
8123
8185
|
*/
|
|
8124
8186
|
function addHostAccessRequest(request: AddHostAccessRequest): Promise<void>;
|
|
8125
8187
|
function addHostAccessRequest(request: AddHostAccessRequest, callback: () => void): void;
|
|
@@ -8167,7 +8229,9 @@ declare namespace chrome {
|
|
|
8167
8229
|
|
|
8168
8230
|
/**
|
|
8169
8231
|
* Removes a host access request, if existent.
|
|
8170
|
-
*
|
|
8232
|
+
*
|
|
8233
|
+
* Can return its result via Promise.
|
|
8234
|
+
* @since Chrome 133, MV3
|
|
8171
8235
|
*/
|
|
8172
8236
|
function removeHostAccessRequest(request: RemoveHostAccessRequest): Promise<void>;
|
|
8173
8237
|
function removeHostAccessRequest(request: RemoveHostAccessRequest, callback: () => void): void;
|
|
@@ -8183,7 +8247,7 @@ declare namespace chrome {
|
|
|
8183
8247
|
// Platform Keys
|
|
8184
8248
|
////////////////////
|
|
8185
8249
|
/**
|
|
8186
|
-
* Use the `chrome.platformKeys` API to access client certificates managed by the platform. If the user or policy grants the permission, an extension can use such a certificate in its custom authentication protocol. E.g. this allows usage of platform managed certificates in third party VPNs (see chrome.vpnProvider).
|
|
8250
|
+
* Use the `chrome.platformKeys` API to access client certificates managed by the platform. If the user or policy grants the permission, an extension can use such a certificate in its custom authentication protocol. E.g. this allows usage of platform managed certificates in third party VPNs (see {@link chrome.vpnProvider}).
|
|
8187
8251
|
*
|
|
8188
8252
|
* Permissions: "platformKeys"
|
|
8189
8253
|
* @platform ChromeOS only
|
|
@@ -8250,7 +8314,7 @@ declare namespace chrome {
|
|
|
8250
8314
|
/**
|
|
8251
8315
|
* Passes the key pair of `certificate` for usage with {@link platformKeys.subtleCrypto} to `callback`.
|
|
8252
8316
|
* @param certificate The certificate of a {@link Match} returned by {@link selectClientCertificates}.
|
|
8253
|
-
* @param parameters Determines signature/hash algorithm parameters additionally to the parameters fixed by the key itself. The same parameters are accepted as by WebCrypto's importKey function, e.g. `RsaHashedImportParams` for a RSASSA-PKCS1-v1_5 key and `EcKeyImportParams` for EC key. Additionally for RSASSA-PKCS1-v1_5 keys, hashing algorithm name parameter can be specified with one of the following values: "none", "SHA-1", "SHA-256", "SHA-384", or "SHA-512", e.g. `{"hash": { "name": "none" } }`. The sign function will then apply PKCS#1 v1.5 padding but not hash the given data.
|
|
8317
|
+
* @param parameters Determines signature/hash algorithm parameters additionally to the parameters fixed by the key itself. The same parameters are accepted as by WebCrypto's [importKey](https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-importKey) function, e.g. `RsaHashedImportParams` for a RSASSA-PKCS1-v1_5 key and `EcKeyImportParams` for EC key. Additionally for RSASSA-PKCS1-v1_5 keys, hashing algorithm name parameter can be specified with one of the following values: "none", "SHA-1", "SHA-256", "SHA-384", or "SHA-512", e.g. `{"hash": { "name": "none" } }`. The sign function will then apply PKCS#1 v1.5 padding but not hash the given data.
|
|
8254
8318
|
*
|
|
8255
8319
|
* Currently, this method only supports the "RSASSA-PKCS1-v1\_5" and "ECDSA" algorithms.
|
|
8256
8320
|
*/
|
|
@@ -8300,7 +8364,7 @@ declare namespace chrome {
|
|
|
8300
8364
|
*/
|
|
8301
8365
|
export namespace power {
|
|
8302
8366
|
enum Level {
|
|
8303
|
-
/** Prevents the display from being turned off or dimmed, or the system from sleeping in response to user inactivity */
|
|
8367
|
+
/** Prevents the display from being turned off or dimmed, or the system from sleeping in response to user inactivity. */
|
|
8304
8368
|
DISPLAY = "display",
|
|
8305
8369
|
/** Prevents the system from sleeping in response to user inactivity. */
|
|
8306
8370
|
SYSTEM = "system",
|
|
@@ -8314,6 +8378,7 @@ declare namespace chrome {
|
|
|
8314
8378
|
|
|
8315
8379
|
/**
|
|
8316
8380
|
* Reports a user activity in order to awake the screen from a dimmed or turned off state or from a screensaver. Exits the screensaver if it is currently active.
|
|
8381
|
+
*
|
|
8317
8382
|
* Can return its result via Promise in Manifest V3 or later.
|
|
8318
8383
|
* @platform ChromeOS only
|
|
8319
8384
|
* @since Chrome 113
|
|
@@ -8353,11 +8418,6 @@ declare namespace chrome {
|
|
|
8353
8418
|
INVALID_DATA = "INVALID_DATA",
|
|
8354
8419
|
}
|
|
8355
8420
|
|
|
8356
|
-
interface PrinterCapabilities {
|
|
8357
|
-
/** Device capabilities in CDD format. */
|
|
8358
|
-
capabilities: { [key: string]: unknown };
|
|
8359
|
-
}
|
|
8360
|
-
|
|
8361
8421
|
interface PrintJob {
|
|
8362
8422
|
/** ID of the printer which should handle the job. */
|
|
8363
8423
|
printerId: string;
|
|
@@ -8418,7 +8478,13 @@ declare namespace chrome {
|
|
|
8418
8478
|
|
|
8419
8479
|
/** Event fired when print manager requests printer capabilities. */
|
|
8420
8480
|
const onGetCapabilityRequested: events.Event<
|
|
8421
|
-
(
|
|
8481
|
+
(
|
|
8482
|
+
printerId: string,
|
|
8483
|
+
resultCallback: (
|
|
8484
|
+
/** Device capabilities in CDD format. */
|
|
8485
|
+
capabilities: { [key: string]: unknown },
|
|
8486
|
+
) => void,
|
|
8487
|
+
) => void
|
|
8422
8488
|
>;
|
|
8423
8489
|
|
|
8424
8490
|
/** Event fired when print manager requests printing. */
|
|
@@ -8432,17 +8498,16 @@ declare namespace chrome {
|
|
|
8432
8498
|
////////////////////
|
|
8433
8499
|
/**
|
|
8434
8500
|
* Use the `chrome.printing` API to send print jobs to printers installed on Chromebook.
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
*/
|
|
8501
|
+
* Permissions: "printing"
|
|
8502
|
+
* @platform ChromeOS only
|
|
8503
|
+
* @since Chrome 81
|
|
8504
|
+
*/
|
|
8440
8505
|
export namespace printing {
|
|
8441
8506
|
interface GetPrinterInfoResponse {
|
|
8442
8507
|
/** Printer capabilities in [CDD format](https://developers.google.com/cloud-print/docs/cdd#cdd-example). The property may be missing. */
|
|
8443
8508
|
capabilities?: { [key: string]: unknown };
|
|
8444
8509
|
/** The status of the printer. */
|
|
8445
|
-
status: PrinterStatus
|
|
8510
|
+
status: `${PrinterStatus}`;
|
|
8446
8511
|
}
|
|
8447
8512
|
|
|
8448
8513
|
/** Status of the print job. */
|
|
@@ -8529,7 +8594,7 @@ declare namespace chrome {
|
|
|
8529
8594
|
/** The id of created print job. This is a unique identifier among all print jobs on the device. If status is not OK, jobId will be null. */
|
|
8530
8595
|
jobId: string | null;
|
|
8531
8596
|
/** The status of the request. */
|
|
8532
|
-
status: SubmitJobStatus
|
|
8597
|
+
status: `${SubmitJobStatus}`;
|
|
8533
8598
|
}
|
|
8534
8599
|
|
|
8535
8600
|
/** The status of submitJob request. */
|
|
@@ -8555,6 +8620,8 @@ declare namespace chrome {
|
|
|
8555
8620
|
|
|
8556
8621
|
/**
|
|
8557
8622
|
* Returns the status of the print job. This call will fail with a runtime error if the print job with the given `jobId` doesn't exist. `jobId`: The id of the print job to return the status of. This should be the same id received in a {@link SubmitJobResponse}.
|
|
8623
|
+
*
|
|
8624
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
8558
8625
|
* @since Chrome 135
|
|
8559
8626
|
*/
|
|
8560
8627
|
function getJobStatus(jobId: string): Promise<`${JobStatus}`>;
|
|
@@ -8632,7 +8699,7 @@ declare namespace chrome {
|
|
|
8632
8699
|
/** Displayed name of the printer. */
|
|
8633
8700
|
name: string;
|
|
8634
8701
|
/** The source of the printer. */
|
|
8635
|
-
source: PrinterSource
|
|
8702
|
+
source: `${PrinterSource}`;
|
|
8636
8703
|
/** The full path for the printer. Contains protocol, hostname, port, and queue. */
|
|
8637
8704
|
uri: string;
|
|
8638
8705
|
}
|
|
@@ -8660,15 +8727,15 @@ declare namespace chrome {
|
|
|
8660
8727
|
* The status of the printer.
|
|
8661
8728
|
* @since Chrome 85
|
|
8662
8729
|
*/
|
|
8663
|
-
printer_status:
|
|
8730
|
+
printer_status: `${printing.PrinterStatus}`;
|
|
8664
8731
|
/** The settings of the print job. */
|
|
8665
8732
|
settings: PrintSettings;
|
|
8666
8733
|
/** Source showing who initiated the print job. */
|
|
8667
|
-
source: PrintJobSource
|
|
8734
|
+
source: `${PrintJobSource}`;
|
|
8668
8735
|
/** ID of source. Null if source is PRINT_PREVIEW or ANDROID_APP. */
|
|
8669
8736
|
sourceId: string | null;
|
|
8670
8737
|
/** The final status of the job. */
|
|
8671
|
-
status: PrintJobStatus
|
|
8738
|
+
status: `${PrintJobStatus}`;
|
|
8672
8739
|
/** The title of the document which was printed. */
|
|
8673
8740
|
title: string;
|
|
8674
8741
|
}
|
|
@@ -8697,11 +8764,11 @@ declare namespace chrome {
|
|
|
8697
8764
|
|
|
8698
8765
|
interface PrintSettings {
|
|
8699
8766
|
/** The requested color mode. */
|
|
8700
|
-
color: ColorMode
|
|
8767
|
+
color: `${ColorMode}`;
|
|
8701
8768
|
/** The requested number of copies. */
|
|
8702
8769
|
copies: number;
|
|
8703
8770
|
/** The requested duplex mode. */
|
|
8704
|
-
duplex: DuplexMode
|
|
8771
|
+
duplex: `${DuplexMode}`;
|
|
8705
8772
|
/** The requested media size. */
|
|
8706
8773
|
mediaSize: MediaSize;
|
|
8707
8774
|
}
|
|
@@ -8732,6 +8799,7 @@ declare namespace chrome {
|
|
|
8732
8799
|
* @since Chrome 151
|
|
8733
8800
|
*/
|
|
8734
8801
|
enum AutofillBlockedType {
|
|
8802
|
+
ALL = "all",
|
|
8735
8803
|
CONTACT_INFO = "contact_info",
|
|
8736
8804
|
PAYMENTS = "payments",
|
|
8737
8805
|
IDENTITY_DOCS = "identity_docs",
|
|
@@ -8774,7 +8842,7 @@ declare namespace chrome {
|
|
|
8774
8842
|
/**
|
|
8775
8843
|
* If enabled, Chrome offers to automatically fill in forms.
|
|
8776
8844
|
* This preference's value is a boolean, defaulting to `true`.
|
|
8777
|
-
* @deprecated since Chrome 70. Please use privacy.services.autofillAddressEnabled and privacy.services.autofillCreditCardEnabled. This remains for backward compatibility in this release and will be removed in the future */
|
|
8845
|
+
* @deprecated since Chrome 70. Please use privacy.services.autofillAddressEnabled and privacy.services.autofillCreditCardEnabled. This remains for backward compatibility in this release and will be removed in the future. */
|
|
8778
8846
|
autofillEnabled: chrome.types.ChromeSetting<boolean>;
|
|
8779
8847
|
|
|
8780
8848
|
/**
|
|
@@ -8817,8 +8885,8 @@ declare namespace chrome {
|
|
|
8817
8885
|
/** Settings that influence Chrome's handling of network connections in general. */
|
|
8818
8886
|
const network: {
|
|
8819
8887
|
/**
|
|
8820
|
-
* If enabled, Chrome attempts to speed up your web browsing experience by pre-resolving DNS entries
|
|
8821
|
-
*
|
|
8888
|
+
* If enabled, Chrome attempts to speed up your web browsing experience by pre-resolving DNS entries, preemptively opening TCP and SSL connections to servers, and preloading pages.
|
|
8889
|
+
* Disabling this preference overrides site owners' ability to speculatively load content (such as prefetching or prerendering via the Speculation Rules API). It does not affect webpage-initiated preconnects or DNS prefetches.
|
|
8822
8890
|
* This preference's value is a boolean, defaulting to `true`.
|
|
8823
8891
|
*/
|
|
8824
8892
|
networkPredictionEnabled: chrome.types.ChromeSetting<boolean>;
|
|
@@ -8826,7 +8894,7 @@ declare namespace chrome {
|
|
|
8826
8894
|
/**
|
|
8827
8895
|
* Allow users to specify the media performance/privacy tradeoffs which impacts how WebRTC traffic will be routed and how much local address information is exposed.
|
|
8828
8896
|
* This preference's value is of type IPHandlingPolicy, defaulting to `default`.
|
|
8829
|
-
*
|
|
8897
|
+
* @since Chrome 48
|
|
8830
8898
|
*/
|
|
8831
8899
|
webRTCIPHandlingPolicy: chrome.types.ChromeSetting<`${IPHandlingPolicy}`>;
|
|
8832
8900
|
};
|
|
@@ -8880,10 +8948,15 @@ declare namespace chrome {
|
|
|
8880
8948
|
* The value of this preference is of type boolean, and the default value is `true`.
|
|
8881
8949
|
* Extensions may only disable this API by setting the value to `false`. If you try setting this API to `true`, it will throw an error.
|
|
8882
8950
|
* @since Chrome 121
|
|
8951
|
+
* @deprecated since Chrome 144. Will be removed around Chrome 153.
|
|
8883
8952
|
*/
|
|
8884
8953
|
relatedWebsiteSetsEnabled: chrome.types.ChromeSetting<boolean>;
|
|
8885
8954
|
|
|
8886
|
-
/**
|
|
8955
|
+
/**
|
|
8956
|
+
* If disabled, Chrome blocks third-party sites from setting cookies. The value of this preference is of type boolean, and the default value is `true`. Extensions may not enable this API in Incognito mode, where third-party cookies are blocked and can only be allowed at the site level. If you try setting this API to true in Incognito, it will throw an error.
|
|
8957
|
+
*
|
|
8958
|
+
* Note: Individual sites may still be able to access third-party cookies when this API returns `false`, if they have a valid exemption or they use the Storage Access API instead.
|
|
8959
|
+
*/
|
|
8887
8960
|
thirdPartyCookiesAllowed: chrome.types.ChromeSetting<boolean>;
|
|
8888
8961
|
|
|
8889
8962
|
/**
|
|
@@ -10286,7 +10359,10 @@ declare namespace chrome {
|
|
|
10286
10359
|
& {
|
|
10287
10360
|
/** Details specifying the target into which to inject the script. */
|
|
10288
10361
|
target: InjectionTarget;
|
|
10289
|
-
/**
|
|
10362
|
+
/**
|
|
10363
|
+
* The JavaScript "world" to run the script in. Defaults to `ISOLATED`.
|
|
10364
|
+
* @since Chrome 95
|
|
10365
|
+
*/
|
|
10290
10366
|
world?: `${ExecutionWorld}`;
|
|
10291
10367
|
/**
|
|
10292
10368
|
* Whether the injection should be triggered in the target as soon as possible. Note that this is not a guarantee that injection will occur prior to page load, as the page may have already loaded by the time the script reaches the target.
|
|
@@ -10296,20 +10372,32 @@ declare namespace chrome {
|
|
|
10296
10372
|
}
|
|
10297
10373
|
& (
|
|
10298
10374
|
| {
|
|
10299
|
-
/**
|
|
10375
|
+
/**
|
|
10376
|
+
* A JavaScript function to inject. This function will be serialized, and then deserialized for injection. This means that any bound parameters and execution context will be lost. Exactly one of `files` or `func` must be specified.
|
|
10377
|
+
* @since Chrome 92
|
|
10378
|
+
*/
|
|
10300
10379
|
func?: never | undefined;
|
|
10301
10380
|
/** The path of the JS or CSS files to inject, relative to the extension's root directory. Exactly one of files or func must be specified. */
|
|
10302
10381
|
files: string[];
|
|
10303
10382
|
}
|
|
10304
10383
|
| ({
|
|
10305
|
-
/**
|
|
10384
|
+
/**
|
|
10385
|
+
* A JavaScript function to inject. This function will be serialized, and then deserialized for injection. This means that any bound parameters and execution context will be lost. Exactly one of `files` or `func` must be specified.
|
|
10386
|
+
* @since Chrome 92
|
|
10387
|
+
*/
|
|
10306
10388
|
func: () => Result;
|
|
10307
10389
|
/** The path of the JS or CSS files to inject, relative to the extension's root directory. Exactly one of files or func must be specified. */
|
|
10308
10390
|
files?: never | undefined;
|
|
10309
10391
|
} | {
|
|
10310
|
-
/**
|
|
10392
|
+
/**
|
|
10393
|
+
* The arguments to pass to the provided function. This is only valid if the `func` parameter is specified. These arguments must be JSON-serializable.
|
|
10394
|
+
* @since Chrome 92
|
|
10395
|
+
*/
|
|
10311
10396
|
args: Args;
|
|
10312
|
-
/**
|
|
10397
|
+
/**
|
|
10398
|
+
* A JavaScript function to inject. This function will be serialized, and then deserialized for injection. This means that any bound parameters and execution context will be lost. Exactly one of `files` or `func` must be specified.
|
|
10399
|
+
* @since Chrome 92
|
|
10400
|
+
*/
|
|
10313
10401
|
func: (...args: Args) => Result;
|
|
10314
10402
|
/** The path of the JS or CSS files to inject, relative to the extension's root directory. Exactly one of files or func must be specified. */
|
|
10315
10403
|
files?: never | undefined;
|
|
@@ -10338,7 +10426,10 @@ declare namespace chrome {
|
|
|
10338
10426
|
persistAcrossSessions?: boolean | undefined;
|
|
10339
10427
|
/** Specifies when JavaScript files are injected into the web page. The preferred and default value is `document_idle`. */
|
|
10340
10428
|
runAt?: extensionTypes.RunAt | undefined;
|
|
10341
|
-
/**
|
|
10429
|
+
/**
|
|
10430
|
+
* he JavaScript "world" to run the script in. Defaults to `ISOLATED`.
|
|
10431
|
+
* @since Chrome 102
|
|
10432
|
+
*/
|
|
10342
10433
|
world?: `${ExecutionWorld}` | undefined;
|
|
10343
10434
|
}
|
|
10344
10435
|
& (
|
|
@@ -10825,6 +10916,10 @@ declare namespace chrome {
|
|
|
10825
10916
|
* Permissions: "system.display"
|
|
10826
10917
|
*/
|
|
10827
10918
|
export namespace system.display {
|
|
10919
|
+
/**
|
|
10920
|
+
* Layout position, i.e. edge of parent that the display is attached to.
|
|
10921
|
+
* @since 53
|
|
10922
|
+
*/
|
|
10828
10923
|
enum LayoutPosition {
|
|
10829
10924
|
TOP = "top",
|
|
10830
10925
|
RIGHT = "right",
|
|
@@ -10934,7 +11029,7 @@ declare namespace chrome {
|
|
|
10934
11029
|
offset: number;
|
|
10935
11030
|
}
|
|
10936
11031
|
|
|
10937
|
-
/**
|
|
11032
|
+
/** @since Chrome 57 */
|
|
10938
11033
|
interface TouchCalibrationPairQuad {
|
|
10939
11034
|
/** First pair of touch and display point required for touch calibration. */
|
|
10940
11035
|
pair1: TouchCalibrationPair;
|
|
@@ -10963,7 +11058,7 @@ declare namespace chrome {
|
|
|
10963
11058
|
* This value should indicate the id of the source display to mirror, which must not be the same as the id passed to setDisplayProperties.
|
|
10964
11059
|
* If set, no other property may be set.
|
|
10965
11060
|
* @platform ChromeOS only
|
|
10966
|
-
* @deprecated
|
|
11061
|
+
* @deprecated since Chrome 68. Use {@link setMirrorMode} instead.
|
|
10967
11062
|
*/
|
|
10968
11063
|
mirroringSourceId?: string | undefined;
|
|
10969
11064
|
/**
|
|
@@ -11137,6 +11232,7 @@ declare namespace chrome {
|
|
|
11137
11232
|
yearOfManufacture: number;
|
|
11138
11233
|
}
|
|
11139
11234
|
|
|
11235
|
+
/** @since Chrome 65 */
|
|
11140
11236
|
interface MirrorModeInfo {
|
|
11141
11237
|
/** The mirror mode that should be set. */
|
|
11142
11238
|
mode: `${MirrorMode}`;
|
|
@@ -11148,6 +11244,7 @@ declare namespace chrome {
|
|
|
11148
11244
|
|
|
11149
11245
|
/**
|
|
11150
11246
|
* Requests the information for all attached display devices.
|
|
11247
|
+
*
|
|
11151
11248
|
* Can return its result via Promise in Manifest V3 or later since Chrome 91.
|
|
11152
11249
|
* @param flags Options affecting how the information is returned.
|
|
11153
11250
|
*/
|
|
@@ -11158,6 +11255,7 @@ declare namespace chrome {
|
|
|
11158
11255
|
|
|
11159
11256
|
/**
|
|
11160
11257
|
* Requests the layout info for all displays
|
|
11258
|
+
*
|
|
11161
11259
|
* Can return its result via Promise in Manifest V3 or later since Chrome 91.
|
|
11162
11260
|
* @platform ChromeOS only
|
|
11163
11261
|
* @since Chrome 53
|
|
@@ -11166,129 +11264,110 @@ declare namespace chrome {
|
|
|
11166
11264
|
function getDisplayLayout(): Promise<DisplayLayout[]>;
|
|
11167
11265
|
|
|
11168
11266
|
/**
|
|
11169
|
-
*
|
|
11170
|
-
*
|
|
11171
|
-
*
|
|
11172
|
-
* according to the information provided in `info`.
|
|
11173
|
-
* On failure, `runtime.lastError` will be set.
|
|
11174
|
-
* @platform ChromeOS only
|
|
11267
|
+
* Updates the properties for the display specified by `id`, according to the information provided in `info`. On failure, {@link runtime.lastError} will be set.
|
|
11268
|
+
*
|
|
11269
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 91.
|
|
11175
11270
|
* @param id The display's unique identifier.
|
|
11176
11271
|
* @param info The information about display properties that should be changed. A property will be changed only if a new value for it is specified in `info`.
|
|
11272
|
+
* @platform ChromeOS only
|
|
11177
11273
|
*/
|
|
11178
11274
|
function setDisplayProperties(id: string, info: DisplayProperties, callback: () => void): void;
|
|
11179
11275
|
function setDisplayProperties(id: string, info: DisplayProperties): Promise<void>;
|
|
11180
11276
|
|
|
11181
11277
|
/**
|
|
11182
|
-
* Set the layout for all displays.
|
|
11183
|
-
*
|
|
11184
|
-
* If a layout would overlap or be otherwise invalid it will be adjusted to a valid layout.
|
|
11185
|
-
* After layout is resolved, an onDisplayChanged event will be triggered.
|
|
11278
|
+
* Set the layout for all displays. display not included will use the default layout. If a layout would overlap or be otherwise invalid it will be adjusted to a valid layout. After layout is resolved, an onDisplayChanged event will be triggered.
|
|
11279
|
+
*
|
|
11186
11280
|
* Can return its result via Promise in Manifest V3 or later since Chrome 91.
|
|
11281
|
+
* @param layouts The layout information, required for all displays except the primary display.
|
|
11187
11282
|
* @platform ChromeOS only
|
|
11188
11283
|
* @since Chrome 53
|
|
11189
|
-
* @param layouts The layout information, required for all displays except the primary display.
|
|
11190
11284
|
*/
|
|
11191
11285
|
function setDisplayLayout(layouts: DisplayLayout[], callback: () => void): void;
|
|
11192
11286
|
function setDisplayLayout(layouts: DisplayLayout[]): Promise<void>;
|
|
11193
11287
|
|
|
11194
11288
|
/**
|
|
11195
|
-
* Enables/disables the unified desktop feature.
|
|
11196
|
-
*
|
|
11197
|
-
* Otherwise, the desktop mode will switch to unified immediately.
|
|
11289
|
+
* Enables/disables the unified desktop feature. If enabled while mirroring is active, the desktop mode will not change until mirroring is turned off. Otherwise, the desktop mode will switch to unified immediately.
|
|
11290
|
+
* @param enabled True if unified desktop should be enabled.
|
|
11198
11291
|
* @platform ChromeOS only
|
|
11199
11292
|
* @since Chrome 46
|
|
11200
|
-
* @param enabled True if unified desktop should be enabled.
|
|
11201
11293
|
*/
|
|
11202
11294
|
function enableUnifiedDesktop(enabled: boolean): void;
|
|
11203
11295
|
|
|
11204
11296
|
/**
|
|
11205
|
-
* Starts overscan calibration for a display.
|
|
11206
|
-
*
|
|
11207
|
-
* If overscan calibration for display `id` is in progress this will reset calibration.
|
|
11297
|
+
* Starts overscan calibration for a display. This will show an overlay on the screen indicating the current overscan insets. If overscan calibration for display `id` is in progress this will reset calibration.
|
|
11298
|
+
* @param id The display's unique identifier.
|
|
11208
11299
|
* @platform ChromeOS only
|
|
11209
11300
|
* @since Chrome 53
|
|
11210
|
-
* @param id The display's unique identifier.
|
|
11211
11301
|
*/
|
|
11212
11302
|
function overscanCalibrationStart(id: string): void;
|
|
11213
11303
|
|
|
11214
11304
|
/**
|
|
11215
|
-
* Adjusts the current overscan insets for a display.
|
|
11216
|
-
* Typically this should either move the display along an axis (e.g. left+right have the same value)
|
|
11217
|
-
* or scale it along an axis (e.g. top+bottom have opposite values).
|
|
11218
|
-
* Each Adjust call is cumulative with previous calls since Start.
|
|
11219
|
-
* @platform ChromeOS only
|
|
11220
|
-
* @since Chrome 53
|
|
11305
|
+
* Adjusts the current overscan insets for a display. Typically this should either move the display along an axis (e.g. left+right have the same value) or scale it along an axis (e.g. top+bottom have opposite values). Each Adjust call is cumulative with previous calls since Start.
|
|
11221
11306
|
* @param id The display's unique identifier.
|
|
11222
11307
|
* @param delta The amount to change the overscan insets.
|
|
11308
|
+
* @platform ChromeOS only
|
|
11309
|
+
* @since Chrome 53
|
|
11223
11310
|
*/
|
|
11224
11311
|
function overscanCalibrationAdjust(id: string, delta: Insets): void;
|
|
11225
11312
|
|
|
11226
11313
|
/**
|
|
11227
11314
|
* Resets the overscan insets for a display to the last saved value (i.e before Start was called).
|
|
11315
|
+
* @param id The display's unique identifier.
|
|
11228
11316
|
* @platform ChromeOS only
|
|
11229
11317
|
* @since Chrome 53
|
|
11230
|
-
* @param id The display's unique identifier.
|
|
11231
11318
|
*/
|
|
11232
11319
|
function overscanCalibrationReset(id: string): void;
|
|
11233
11320
|
|
|
11234
11321
|
/**
|
|
11235
11322
|
* Complete overscan adjustments for a display by saving the current values and hiding the overlay.
|
|
11323
|
+
* @param id The display's unique identifier.
|
|
11236
11324
|
* @platform ChromeOS only
|
|
11237
11325
|
* @since Chrome 53
|
|
11238
|
-
* @param id The display's unique identifier.
|
|
11239
11326
|
*/
|
|
11240
11327
|
function overscanCalibrationComplete(id: string): void;
|
|
11241
11328
|
|
|
11242
11329
|
/**
|
|
11243
|
-
* Displays the native touch calibration UX for the display with `id` as display id.
|
|
11244
|
-
*
|
|
11245
|
-
* The callback will be invoked in case of successful calibration only.
|
|
11246
|
-
* If the calibration fails, this will throw an error.
|
|
11330
|
+
* Displays the native touch calibration UX for the display with `id` as display id. This will show an overlay on the screen with required instructions on how to proceed. The callback will be invoked in case of successful calibration only. If the calibration fails, this will throw an error.
|
|
11331
|
+
*
|
|
11247
11332
|
* Can return its result via Promise in Manifest V3 or later since Chrome 91.
|
|
11333
|
+
* @param id The display's unique identifier.
|
|
11248
11334
|
* @platform ChromeOS only
|
|
11249
11335
|
* @since Chrome 57
|
|
11250
|
-
* @param id The display's unique identifier.
|
|
11251
11336
|
*/
|
|
11252
11337
|
function showNativeTouchCalibration(id: string, callback: (success: boolean) => void): void;
|
|
11253
11338
|
function showNativeTouchCalibration(id: string): Promise<boolean>;
|
|
11254
11339
|
|
|
11255
11340
|
/**
|
|
11256
|
-
* Starts custom touch calibration for a display.
|
|
11257
|
-
*
|
|
11258
|
-
* If another touch calibration is already in progress this will throw an error.
|
|
11341
|
+
* Starts custom touch calibration for a display. This should be called when using a custom UX for collecting calibration data. If another touch calibration is already in progress this will throw an error.
|
|
11342
|
+
* @param id The display's unique identifier.
|
|
11259
11343
|
* @platform ChromeOS only
|
|
11260
11344
|
* @since Chrome 57
|
|
11261
|
-
* @param id The display's unique identifier.
|
|
11262
11345
|
*/
|
|
11263
11346
|
function startCustomTouchCalibration(id: string): void;
|
|
11264
11347
|
|
|
11265
11348
|
/**
|
|
11266
|
-
* Sets the touch calibration pairs for a display.
|
|
11267
|
-
* These `pairs` would be used to calibrate the touch screen for display with `id` called in startCustomTouchCalibration().
|
|
11268
|
-
* Always call `startCustomTouchCalibration` before calling this method.
|
|
11269
|
-
* If another touch calibration is already in progress this will throw an error.
|
|
11270
|
-
* @platform ChromeOS only
|
|
11271
|
-
* @since Chrome 57
|
|
11349
|
+
* Sets the touch calibration pairs for a display. These `pairs` would be used to calibrate the touch screen for display with `id` called in startCustomTouchCalibration(). Always call `startCustomTouchCalibration` before calling this method. If another touch calibration is already in progress this will throw an error.
|
|
11272
11350
|
* @param pairs The pairs of point used to calibrate the display.
|
|
11273
11351
|
* @param bounds Bounds of the display when the touch calibration was performed. `bounds.left` and `bounds.top` values are ignored.
|
|
11274
|
-
* @
|
|
11352
|
+
* @platform ChromeOS only
|
|
11353
|
+
* @since Chrome 57
|
|
11275
11354
|
*/
|
|
11276
11355
|
function completeCustomTouchCalibration(pairs: TouchCalibrationPairQuad, bounds: Bounds): void;
|
|
11277
11356
|
|
|
11278
11357
|
/**
|
|
11279
11358
|
* Resets the touch calibration for the display and brings it back to its default state by clearing any touch calibration data associated with the display.
|
|
11359
|
+
* @param id The display's unique identifier.
|
|
11280
11360
|
* @platform ChromeOS only
|
|
11281
11361
|
* @since Chrome 57
|
|
11282
|
-
* @param id The display's unique identifier.
|
|
11283
11362
|
*/
|
|
11284
11363
|
function clearTouchCalibration(id: string): void;
|
|
11285
11364
|
|
|
11286
11365
|
/**
|
|
11287
|
-
* Sets the display mode to the specified mirror mode.
|
|
11288
|
-
*
|
|
11289
|
-
*
|
|
11290
|
-
* @platform ChromeOS only
|
|
11366
|
+
* Sets the display mode to the specified mirror mode. Each call resets the state from previous calls. Calling {@link setDisplayProperties()} will fail for the mirroring destination displays.
|
|
11367
|
+
*
|
|
11368
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 91.
|
|
11291
11369
|
* @param info The information of the mirror mode that should be applied to the display mode.
|
|
11370
|
+
* @platform ChromeOS only
|
|
11292
11371
|
* @since Chrome 65
|
|
11293
11372
|
*/
|
|
11294
11373
|
function setMirrorMode(info: MirrorModeInfo, callback: () => void): void;
|
|
@@ -11386,6 +11465,7 @@ declare namespace chrome {
|
|
|
11386
11465
|
* Creates a stream ID to capture the target tab. Similar to chrome.tabCapture.capture() method, but returns a media stream ID, instead of a media stream, to the consumer tab.
|
|
11387
11466
|
*
|
|
11388
11467
|
* Can return its result via Promise in Manifest V3 or later since Chrome 116.
|
|
11468
|
+
* @since Chrome 71
|
|
11389
11469
|
*/
|
|
11390
11470
|
function getMediaStreamId(options?: GetMediaStreamOptions): Promise<string>;
|
|
11391
11471
|
function getMediaStreamId(callback: (streamId: string) => void): void;
|
|
@@ -11414,7 +11494,7 @@ declare namespace chrome {
|
|
|
11414
11494
|
interface MutedInfo {
|
|
11415
11495
|
/** Whether the tab is muted (prevented from playing sound). The tab may be muted even if it has not played or is not currently playing sound. Equivalent to whether the 'muted' audio indicator is showing. */
|
|
11416
11496
|
muted: boolean;
|
|
11417
|
-
|
|
11497
|
+
/** The reason the tab was muted or unmuted. Not set if the tab's mute state has never been changed. */
|
|
11418
11498
|
reason?: `${MutedInfoReason}` | undefined;
|
|
11419
11499
|
/** The ID of the extension that changed the muted state. Not set if an extension was not the reason the muted state last changed. */
|
|
11420
11500
|
extensionId?: string | undefined;
|
|
@@ -11429,7 +11509,7 @@ declare namespace chrome {
|
|
|
11429
11509
|
USER = "user",
|
|
11430
11510
|
/** Tab capture was started, forcing a muted state change. */
|
|
11431
11511
|
CAPTURE = "capture",
|
|
11432
|
-
/** An extension set the muted state. */
|
|
11512
|
+
/** An extension, identified by the extensionId field, set the muted state. */
|
|
11433
11513
|
EXTENSION = "extension",
|
|
11434
11514
|
}
|
|
11435
11515
|
|
|
@@ -11516,14 +11596,20 @@ declare namespace chrome {
|
|
|
11516
11596
|
lastAccessed: number;
|
|
11517
11597
|
}
|
|
11518
11598
|
|
|
11519
|
-
/**
|
|
11599
|
+
/**
|
|
11600
|
+
* The tab's loading status.
|
|
11601
|
+
* @since Chrome 44
|
|
11602
|
+
*/
|
|
11520
11603
|
enum TabStatus {
|
|
11521
11604
|
UNLOADED = "unloaded",
|
|
11522
11605
|
LOADING = "loading",
|
|
11523
11606
|
COMPLETE = "complete",
|
|
11524
11607
|
}
|
|
11525
11608
|
|
|
11526
|
-
/**
|
|
11609
|
+
/**
|
|
11610
|
+
* The type of window.
|
|
11611
|
+
* @since Chrome 44
|
|
11612
|
+
*/
|
|
11527
11613
|
enum WindowType {
|
|
11528
11614
|
NORMAL = "normal",
|
|
11529
11615
|
POPUP = "popup",
|
|
@@ -11769,7 +11855,10 @@ declare namespace chrome {
|
|
|
11769
11855
|
}
|
|
11770
11856
|
|
|
11771
11857
|
interface OnUpdatedInfo {
|
|
11772
|
-
/**
|
|
11858
|
+
/**
|
|
11859
|
+
* The tab's new audible state.
|
|
11860
|
+
* @since Chrome 45
|
|
11861
|
+
*/
|
|
11773
11862
|
audible?: boolean;
|
|
11774
11863
|
/**
|
|
11775
11864
|
* The tab's new auto-discardable state.
|
|
@@ -11871,7 +11960,7 @@ declare namespace chrome {
|
|
|
11871
11960
|
* MV2 only
|
|
11872
11961
|
* @param tabId The ID of the tab in which to run the script; defaults to the active tab of the current window.
|
|
11873
11962
|
* @param details Details of the script to run. Either the code or the file property must be set, but both may not be set at the same time
|
|
11874
|
-
* @deprecated since Chrome
|
|
11963
|
+
* @deprecated since Chrome 91. Replaced by {@link scripting.executeScript} in Manifest V3.
|
|
11875
11964
|
*/
|
|
11876
11965
|
function executeScript(details: extensionTypes.InjectDetails): Promise<any[] | undefined>;
|
|
11877
11966
|
function executeScript(
|
|
@@ -11974,7 +12063,7 @@ declare namespace chrome {
|
|
|
11974
12063
|
function remove(tabIds: number[], callback: () => void): void;
|
|
11975
12064
|
|
|
11976
12065
|
/**
|
|
11977
|
-
* Captures the visible area of the currently active tab in the specified window. In order to call this method, the extension must have either the [<all\_urls>](https://developer.chrome.com/extensions/develop/concepts/declare-permissions) permission or the [activeTab](https://developer.chrome.com/docs/extensions/develop/concepts/activeTab) permission. In addition to sites that extensions can normally access, this method allows extensions to capture sensitive sites that are otherwise restricted, including chrome:-scheme pages, other extensions' pages, and data: URLs. These sensitive sites can only be captured with the activeTab permission. File URLs may be captured only if the extension has been granted file access.
|
|
12066
|
+
* Captures the visible area of the currently active tab in the specified window. In order to call this method, the extension must have either the [<all\_urls>](https://developer.chrome.com/docs/extensions/develop/concepts/declare-permissions) permission or the [activeTab](https://developer.chrome.com/docs/extensions/develop/concepts/activeTab) permission. In addition to sites that extensions can normally access, this method allows extensions to capture sensitive sites that are otherwise restricted, including chrome:-scheme pages, other extensions' pages, and data: URLs. These sensitive sites can only be captured with the activeTab permission. File URLs may be captured only if the extension has been granted file access.
|
|
11978
12067
|
*
|
|
11979
12068
|
* Can return its result via Promise in Manifest V3 or later since Chrome 88.
|
|
11980
12069
|
* @param windowId The target window. Defaults to the current window.
|
|
@@ -12071,7 +12160,7 @@ declare namespace chrome {
|
|
|
12071
12160
|
function connect(tabId: number, connectInfo?: ConnectInfo): runtime.Port;
|
|
12072
12161
|
|
|
12073
12162
|
/**
|
|
12074
|
-
* Injects CSS into a page. Styles inserted with this method can be removed with {@link scripting.removeCSS}
|
|
12163
|
+
* Injects CSS into a page. Styles inserted with this method can be removed with {@link scripting.removeCSS}. For details, see the programmatic injection section of the content scripts doc.
|
|
12075
12164
|
*
|
|
12076
12165
|
* Can return its result via Promise in Manifest V3 or later since Chrome 88.
|
|
12077
12166
|
*
|
|
@@ -12360,7 +12449,7 @@ declare namespace chrome {
|
|
|
12360
12449
|
interface MoveProperties {
|
|
12361
12450
|
/** The position to move the group to. Use `-1` to place the group at the end of the window. */
|
|
12362
12451
|
index: number;
|
|
12363
|
-
/** The window to move the group to. Defaults to the window the group is currently in. Note that groups can only be moved to and from windows with {@link windows.
|
|
12452
|
+
/** The window to move the group to. Defaults to the window the group is currently in. Note that groups can only be moved to and from windows with {@link windows.WindowType} type `"normal"`. */
|
|
12364
12453
|
windowId?: number;
|
|
12365
12454
|
}
|
|
12366
12455
|
|
|
@@ -12561,7 +12650,10 @@ declare namespace chrome {
|
|
|
12561
12650
|
voiceName?: string;
|
|
12562
12651
|
}
|
|
12563
12652
|
|
|
12564
|
-
/**
|
|
12653
|
+
/**
|
|
12654
|
+
* @since Chrome 54
|
|
12655
|
+
* @deprecated since Chrome 70. Gender is deprecated and is ignored.
|
|
12656
|
+
*/
|
|
12565
12657
|
enum VoiceGender {
|
|
12566
12658
|
FEMALE = "female",
|
|
12567
12659
|
MALE = "male",
|
|
@@ -12570,7 +12662,7 @@ declare namespace chrome {
|
|
|
12570
12662
|
/**
|
|
12571
12663
|
* Gets an array of all available voices.
|
|
12572
12664
|
*
|
|
12573
|
-
* Can return its result via Promise since Chrome
|
|
12665
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 101.
|
|
12574
12666
|
*/
|
|
12575
12667
|
function getVoices(): Promise<TtsVoice[]>;
|
|
12576
12668
|
function getVoices(callback: (voices: TtsVoice[]) => void): void;
|
|
@@ -12578,7 +12670,7 @@ declare namespace chrome {
|
|
|
12578
12670
|
/**
|
|
12579
12671
|
* Checks whether the engine is currently speaking. On Mac OS X, the result is true whenever the system speech engine is speaking, even if the speech wasn't initiated by Chrome.
|
|
12580
12672
|
*
|
|
12581
|
-
* Can return its result via Promise since Chrome
|
|
12673
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 101.
|
|
12582
12674
|
*/
|
|
12583
12675
|
function isSpeaking(): Promise<boolean>;
|
|
12584
12676
|
function isSpeaking(callback: (speaking: boolean) => void): void;
|
|
@@ -12592,9 +12684,9 @@ declare namespace chrome {
|
|
|
12592
12684
|
/**
|
|
12593
12685
|
* Speaks text using a text-to-speech engine.
|
|
12594
12686
|
* @param utterance The text to speak, either plain text or a complete, well-formed SSML document. Speech engines that do not support SSML will strip away the tags and speak the text. The maximum length of the text is 32,768 characters.
|
|
12595
|
-
* @param options
|
|
12596
|
-
|
|
12597
|
-
* Can return its result via Promise since Chrome
|
|
12687
|
+
* @param options The speech options.
|
|
12688
|
+
*
|
|
12689
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 101.
|
|
12598
12690
|
*/
|
|
12599
12691
|
function speak(utterance: string, options?: TtsOptions): Promise<void>;
|
|
12600
12692
|
function speak(utterance: string, callback: () => void): void;
|
|
@@ -12719,7 +12811,7 @@ declare namespace chrome {
|
|
|
12719
12811
|
|
|
12720
12812
|
/**
|
|
12721
12813
|
* @since Chrome 54
|
|
12722
|
-
* @deprecated Gender is deprecated and will be ignored.
|
|
12814
|
+
* @deprecated since Chrome 70. Gender is deprecated and will be ignored.
|
|
12723
12815
|
*/
|
|
12724
12816
|
enum VoiceGender {
|
|
12725
12817
|
MALE = "male",
|
|
@@ -12728,12 +12820,14 @@ declare namespace chrome {
|
|
|
12728
12820
|
|
|
12729
12821
|
/**
|
|
12730
12822
|
* Called by an engine when a language install is attempted, and when a language is uninstalled. Also called in response to a status request from a client. When a voice is installed or uninstalled, the engine should also call ttsEngine.updateVoices to register the voice.
|
|
12823
|
+
* @param status The install status of the language.
|
|
12731
12824
|
* @since Chrome 132
|
|
12732
12825
|
*/
|
|
12733
12826
|
function updateLanguage(status: LanguageStatus): void;
|
|
12734
12827
|
|
|
12735
12828
|
/**
|
|
12736
12829
|
* Called by an engine to update its list of voices. This list overrides any voices declared in this extension's manifest.
|
|
12830
|
+
* @param voices Array of {@link tts.TtsVoice} objects representing the available voices for speech synthesis.
|
|
12737
12831
|
* @since Chrome 66
|
|
12738
12832
|
*/
|
|
12739
12833
|
function updateVoices(voices: tts.TtsVoice[]): void;
|
|
@@ -12765,13 +12859,13 @@ declare namespace chrome {
|
|
|
12765
12859
|
* Called when the user makes a call to tts.speak() and one of the voices from this extension's manifest is the first to match the options object. Differs from ttsEngine.onSpeak in that Chrome provides audio playback services and handles dispatching tts events.
|
|
12766
12860
|
* @since Chrome 92
|
|
12767
12861
|
*/
|
|
12768
|
-
|
|
12769
12862
|
const onSpeakWithAudioStream: chrome.events.Event<
|
|
12770
12863
|
(
|
|
12771
12864
|
utterance: string,
|
|
12772
12865
|
options: SpeakOptions,
|
|
12773
12866
|
audioStreamOptions: AudioStreamOptions,
|
|
12774
12867
|
sendTtsAudio: (audioBufferParams: AudioBuffer) => void,
|
|
12868
|
+
/** @since Chrome 94 */
|
|
12775
12869
|
sendError: (errorMessage?: string) => void,
|
|
12776
12870
|
) => void
|
|
12777
12871
|
>;
|
|
@@ -13072,7 +13166,7 @@ declare namespace chrome {
|
|
|
13072
13166
|
}
|
|
13073
13167
|
|
|
13074
13168
|
/**
|
|
13075
|
-
* Sets wallpaper to the image at url or wallpaperData with the specified layout
|
|
13169
|
+
* Sets wallpaper to the image at url or wallpaperData with the specified layout.
|
|
13076
13170
|
*
|
|
13077
13171
|
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
|
13078
13172
|
*/
|
|
@@ -13453,7 +13547,7 @@ declare namespace chrome {
|
|
|
13453
13547
|
/**
|
|
13454
13548
|
* Use the `chrome.webRequest` API to observe and analyze traffic and to intercept, block, or modify requests in-flight.
|
|
13455
13549
|
*
|
|
13456
|
-
* Permissions: "webRequest"
|
|
13550
|
+
* Permissions: "webRequest", "webRequestBlocking", "webRequestAuthProvider"
|
|
13457
13551
|
*
|
|
13458
13552
|
* Manifest: "host_permissions"
|
|
13459
13553
|
*/
|
|
@@ -13750,7 +13844,7 @@ declare namespace chrome {
|
|
|
13750
13844
|
requestBody?: {
|
|
13751
13845
|
/** Errors when obtaining request body data. */
|
|
13752
13846
|
error?: string;
|
|
13753
|
-
/** 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':
|
|
13847
|
+
/** 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']}. */
|
|
13754
13848
|
formData?: { [key: string]: FormDataItem[] };
|
|
13755
13849
|
/** 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. */
|
|
13756
13850
|
raw?: UploadData[];
|
|
@@ -13792,9 +13886,12 @@ declare namespace chrome {
|
|
|
13792
13886
|
* @since Chrome 144
|
|
13793
13887
|
*/
|
|
13794
13888
|
securityInfo?: SecurityInfo;
|
|
13795
|
-
/**
|
|
13889
|
+
/**
|
|
13890
|
+
* Standard HTTP status code returned by the server.
|
|
13891
|
+
* @since Chrome 43
|
|
13892
|
+
*/
|
|
13796
13893
|
statusCode: number;
|
|
13797
|
-
/** HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., responses that lack a status line)
|
|
13894
|
+
/** HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., responses that lack a status line). */
|
|
13798
13895
|
statusLine: string;
|
|
13799
13896
|
}
|
|
13800
13897
|
|
|
@@ -13823,6 +13920,7 @@ declare namespace chrome {
|
|
|
13823
13920
|
function handlerBehaviorChanged(): Promise<void>;
|
|
13824
13921
|
function handlerBehaviorChanged(callback: () => void): void;
|
|
13825
13922
|
|
|
13923
|
+
/** @since Chrome 70 */
|
|
13826
13924
|
const onActionIgnored: events.Event<
|
|
13827
13925
|
(details: {
|
|
13828
13926
|
/** The proposed action which was ignored. */
|
|
@@ -13918,7 +14016,7 @@ declare namespace chrome {
|
|
|
13918
14016
|
tabs?: chrome.tabs.Tab[] | undefined;
|
|
13919
14017
|
/** The offset of the window from the top edge of the screen in pixels. In some circumstances a window may not be assigned a `top` property; for example, when querying closed windows from the {@link sessions} API. */
|
|
13920
14018
|
top?: number | undefined;
|
|
13921
|
-
/** The height of the window, including the frame, in pixels. In some circumstances a window may not be assigned a `height` property
|
|
14019
|
+
/** The height of the window, including the frame, in pixels. In some circumstances a window may not be assigned a `height` property; for example, when querying closed windows from the {@link sessions} API. */
|
|
13922
14020
|
height?: number | undefined;
|
|
13923
14021
|
/** The width of the window, including the frame, in pixels. In some circumstances a window may not be assigned a `width` property; for example, when querying closed windows from the {@link sessions} API. */
|
|
13924
14022
|
width?: number | undefined;
|
|
@@ -13998,7 +14096,7 @@ declare namespace chrome {
|
|
|
13998
14096
|
|
|
13999
14097
|
/**
|
|
14000
14098
|
* Specifies what type of browser window to create.
|
|
14001
|
-
* 'panel' is deprecated and is available only to existing
|
|
14099
|
+
* 'panel' is deprecated and is available only to existing allowlisted extensions on Chrome OS.
|
|
14002
14100
|
* @since Chrome 44
|
|
14003
14101
|
*/
|
|
14004
14102
|
enum CreateType {
|
|
@@ -14047,7 +14145,7 @@ declare namespace chrome {
|
|
|
14047
14145
|
/** The windowId value that represents the current window. */
|
|
14048
14146
|
const WINDOW_ID_CURRENT: -2;
|
|
14049
14147
|
|
|
14050
|
-
/** The windowId value that represents the absence of a Chrome browser window */
|
|
14148
|
+
/** The windowId value that represents the absence of a Chrome browser window. */
|
|
14051
14149
|
const WINDOW_ID_NONE: -1;
|
|
14052
14150
|
|
|
14053
14151
|
/**
|
|
@@ -14175,7 +14273,10 @@ declare namespace chrome {
|
|
|
14175
14273
|
*/
|
|
14176
14274
|
const MAX_NUMBER_OF_ENABLED_STATIC_RULESETS: 50;
|
|
14177
14275
|
|
|
14178
|
-
/**
|
|
14276
|
+
/**
|
|
14277
|
+
* The maximum number of combined dynamic and session scoped rules an extension can add.
|
|
14278
|
+
* @deprecated There is no longer a combined limit. See {@link MAX_NUMBER_OF_DYNAMIC_RULES} and {@link MAX_NUMBER_OF_SESSION_RULES}.
|
|
14279
|
+
*/
|
|
14179
14280
|
const MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES: 5000;
|
|
14180
14281
|
|
|
14181
14282
|
/**
|
|
@@ -14280,7 +14381,7 @@ declare namespace chrome {
|
|
|
14280
14381
|
enum DomainType {
|
|
14281
14382
|
/** The network request is first party to the frame in which it originated. */
|
|
14282
14383
|
FIRST_PARTY = "firstParty",
|
|
14283
|
-
|
|
14384
|
+
/** The network request is third party to the frame in which it originated. */
|
|
14284
14385
|
THIRD_PARTY = "thirdParty",
|
|
14285
14386
|
}
|
|
14286
14387
|
|
|
@@ -14469,7 +14570,7 @@ declare namespace chrome {
|
|
|
14469
14570
|
* - Use punycode encoding for internationalized domains.
|
|
14470
14571
|
* - Sub-domains of the listed domains are also matched.
|
|
14471
14572
|
* - For requests with no associated top-level frame (e.g. ServiceWorker initiated requests, the request initiator's domain is considered instead.
|
|
14472
|
-
* @since Chrome
|
|
14573
|
+
* @since Chrome 145
|
|
14473
14574
|
*/
|
|
14474
14575
|
topDomains?: string[] | undefined;
|
|
14475
14576
|
|
|
@@ -14482,7 +14583,7 @@ declare namespace chrome {
|
|
|
14482
14583
|
* - Use punycode encoding for internationalized domains.
|
|
14483
14584
|
* - Sub-domains of the listed domains are also excluded.
|
|
14484
14585
|
* - For requests with no associated top-level frame (e.g. ServiceWorker initiated requests, the request initiator's domain is considered instead.
|
|
14485
|
-
* @since Chrome
|
|
14586
|
+
* @since Chrome 145
|
|
14486
14587
|
*/
|
|
14487
14588
|
excludedTopDomains?: string[] | undefined;
|
|
14488
14589
|
|
|
@@ -14707,7 +14808,10 @@ declare namespace chrome {
|
|
|
14707
14808
|
* This preference is persisted across sessions.
|
|
14708
14809
|
*/
|
|
14709
14810
|
displayActionCountAsBadgeText?: boolean | undefined;
|
|
14710
|
-
/**
|
|
14811
|
+
/**
|
|
14812
|
+
* Details of how the tab's action count should be adjusted.
|
|
14813
|
+
* @since Chrome 89
|
|
14814
|
+
*/
|
|
14711
14815
|
tabUpdate?: TabActionCountUpdate | undefined;
|
|
14712
14816
|
}
|
|
14713
14817
|
|
|
@@ -14922,7 +15026,7 @@ declare namespace chrome {
|
|
|
14922
15026
|
* * This update happens as a single atomic operation: either all specified rules are added and removed, or an error is returned.
|
|
14923
15027
|
* * These rules are persisted across browser sessions and across extension updates.
|
|
14924
15028
|
* * Static rules specified as part of the extension package can not be removed using this function.
|
|
14925
|
-
* * {@link MAX_NUMBER_OF_DYNAMIC_RULES} is the maximum number of dynamic rules an extension can add. The number of [unsafe rules](https://developer.chrome.com/docs/extensions/reference/declarativeNetRequest
|
|
15029
|
+
* * {@link MAX_NUMBER_OF_DYNAMIC_RULES} is the maximum number of dynamic rules an extension can add. The number of [unsafe rules](https://developer.chrome.com/docs/extensions/reference/api/declarativeNetRequest#safe_rules) must not exceed {@link MAX_NUMBER_OF_UNSAFE_DYNAMIC_RULES}.
|
|
14926
15030
|
*
|
|
14927
15031
|
* Can return its result via Promise in Manifest V3 or later since Chrome 91.
|
|
14928
15032
|
*/
|
|
@@ -14977,13 +15081,13 @@ declare namespace chrome {
|
|
|
14977
15081
|
/** @since Chrome 141 */
|
|
14978
15082
|
type CloseOptions =
|
|
14979
15083
|
| {
|
|
14980
|
-
/** The tab in which to close the side panel. If a tab-specific side panel is open in the specified tab, it will be closed for that tab. At least one of this or `windowId` must be provided. */
|
|
15084
|
+
/** The tab in which to close the side panel. If a tab-specific side panel is open in the specified tab, it will be closed for that tab. If only the global side panel is open, the promise returned by the call to `close()` will reject with an error. This behavior was changed in Chrome 145, with prior versions falling back to closing the global panel. At least one of this or `windowId` must be provided. */
|
|
14981
15085
|
tabId: number;
|
|
14982
15086
|
/** The window in which to close the side panel. If a global side panel is open in the specified window, it will be closed for all tabs in that window where no tab-specific panel is active. At least one of this or `tabId` must be provided. */
|
|
14983
15087
|
windowId?: number | undefined;
|
|
14984
15088
|
}
|
|
14985
15089
|
| {
|
|
14986
|
-
/** The tab in which to close the side panel. If a tab-specific side panel is open in the specified tab, it will be closed for that tab. At least one of this or `windowId` must be provided. */
|
|
15090
|
+
/** The tab in which to close the side panel. If a tab-specific side panel is open in the specified tab, it will be closed for that tab. If only the global side panel is open, the promise returned by the call to `close()` will reject with an error. This behavior was changed in Chrome 145, with prior versions falling back to closing the global panel. At least one of this or `windowId` must be provided. */
|
|
14987
15091
|
tabId?: number | undefined;
|
|
14988
15092
|
/** The window in which to close the side panel. If a global side panel is open in the specified window, it will be closed for all tabs in that window where no tab-specific panel is active. At least one of this or `tabId` must be provided. */
|
|
14989
15093
|
windowId: number;
|
|
@@ -15081,6 +15185,8 @@ declare namespace chrome {
|
|
|
15081
15185
|
/**
|
|
15082
15186
|
* Closes the extension's side panel. This is a no-op if the panel is already closed.
|
|
15083
15187
|
* @param options Specifies the context in which to close the side panel.
|
|
15188
|
+
*
|
|
15189
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
15084
15190
|
* @since Chrome 141
|
|
15085
15191
|
*/
|
|
15086
15192
|
function close(options: CloseOptions): Promise<void>;
|
|
@@ -15088,6 +15194,8 @@ declare namespace chrome {
|
|
|
15088
15194
|
|
|
15089
15195
|
/**
|
|
15090
15196
|
* Returns the side panel's current layout.
|
|
15197
|
+
*
|
|
15198
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
15091
15199
|
* @since Chrome 140
|
|
15092
15200
|
*/
|
|
15093
15201
|
function getLayout(): Promise<PanelLayout>;
|
|
@@ -15096,7 +15204,7 @@ declare namespace chrome {
|
|
|
15096
15204
|
/**
|
|
15097
15205
|
* Returns the active panel configuration.
|
|
15098
15206
|
*
|
|
15099
|
-
* Can return its result via Promise.
|
|
15207
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
15100
15208
|
* @param options Specifies the context to return the configuration for.
|
|
15101
15209
|
*/
|
|
15102
15210
|
function getOptions(options: GetPanelOptions): Promise<PanelOptions>;
|
|
@@ -15105,7 +15213,7 @@ declare namespace chrome {
|
|
|
15105
15213
|
/**
|
|
15106
15214
|
* Returns the extension's current side panel behavior.
|
|
15107
15215
|
*
|
|
15108
|
-
* Can return its result via Promise.
|
|
15216
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
15109
15217
|
*/
|
|
15110
15218
|
function getPanelBehavior(): Promise<PanelBehavior>;
|
|
15111
15219
|
function getPanelBehavior(callback: (behavior: PanelBehavior) => void): void;
|
|
@@ -15113,7 +15221,7 @@ declare namespace chrome {
|
|
|
15113
15221
|
/**
|
|
15114
15222
|
* Opens the side panel for the extension. This may only be called in response to a user action.
|
|
15115
15223
|
*
|
|
15116
|
-
* Can return its result via Promise.
|
|
15224
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
15117
15225
|
* @param options Specifies the context in which to open the side panel.
|
|
15118
15226
|
* @since Chrome 116
|
|
15119
15227
|
*/
|
|
@@ -15123,7 +15231,7 @@ declare namespace chrome {
|
|
|
15123
15231
|
/**
|
|
15124
15232
|
* Configures the side panel.
|
|
15125
15233
|
*
|
|
15126
|
-
* Can return its result via Promise.
|
|
15234
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
15127
15235
|
* @param options The configuration options to apply to the panel.
|
|
15128
15236
|
*/
|
|
15129
15237
|
function setOptions(options: PanelOptions): Promise<void>;
|
|
@@ -15132,7 +15240,7 @@ declare namespace chrome {
|
|
|
15132
15240
|
/**
|
|
15133
15241
|
* Configures the extension's side panel behavior. This is an upsert operation.
|
|
15134
15242
|
*
|
|
15135
|
-
* Can return its result via Promise.
|
|
15243
|
+
* Can return its result via Promise in Manifest V3 or later.
|
|
15136
15244
|
* @param behavior The new behavior to be set.
|
|
15137
15245
|
*/
|
|
15138
15246
|
function setPanelBehavior(behavior: PanelBehavior): Promise<void>;
|
|
@@ -15341,14 +15449,17 @@ declare namespace chrome {
|
|
|
15341
15449
|
* Registers one or more user scripts for this extension.
|
|
15342
15450
|
*
|
|
15343
15451
|
* Can return its result via Promise.
|
|
15344
|
-
* @param scripts
|
|
15452
|
+
* @param scripts Contains a list of user scripts to be registered.
|
|
15345
15453
|
*/
|
|
15346
15454
|
function register(scripts: RegisteredUserScript[]): Promise<void>;
|
|
15347
15455
|
function register(scripts: RegisteredUserScript[], callback: () => void): void;
|
|
15348
15456
|
|
|
15349
15457
|
/**
|
|
15350
15458
|
* Resets the configuration for a user script world. Any scripts that inject into the world with the specified ID will use the default world configuration.
|
|
15459
|
+
*
|
|
15460
|
+
* Can return its result via Promise.
|
|
15351
15461
|
* @param worldId The ID of the user script world to reset. If omitted, resets the default world's configuration.
|
|
15462
|
+
* @since Chrome 133
|
|
15352
15463
|
*/
|
|
15353
15464
|
function resetWorldConfiguration(worldId?: string): Promise<void>;
|
|
15354
15465
|
function resetWorldConfiguration(callback: () => void): void;
|