@types/chrome 0.3.1 → 0.3.3

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.
Files changed (3) hide show
  1. chrome/README.md +1 -1
  2. chrome/index.d.ts +328 -217
  3. 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 html file to show in a popup. If set to the empty string (`''`), no popup is shown. */
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
- /* The URL navigated to when a user clicks the bookmark. Omitted for folders. */
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 Chrome 90
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 Chrome 90
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 Chrome 90
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 Chrome 90
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 Chrome 90
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 Chrome 90
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 Chrome 90
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 Chrome 90
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 Chrome 90
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
- /** Optional. Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
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
- /** Cache storage. */
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
- * Manifest: "certificateProvider"
1306
+ * Permissions: "certificateProvider"
1304
1307
  * @platform ChromeOS only
1305
1308
  * @since Chrome 46
1306
1309
  */
1307
1310
  export namespace certificateProvider {
1308
- /** Types of supported cryptographic signature algorithms. */
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 149 */
1967
+ /** @since Chrome 150 */
1962
1968
  TAB = "tab",
1963
1969
  }
1964
1970
 
@@ -2044,7 +2050,7 @@ declare namespace chrome {
2044
2050
  const ACTION_MENU_TOP_LEVEL_LIMIT: 6;
2045
2051
 
2046
2052
  /**
2047
- * Creates a new context menu item. If an error occurs during creation, it may not be detected until the creation callback fires; details will be in {@link chrome.runtime.lastError}.
2053
+ * Creates a new context menu item. If an error occurs during creation, it may not be detected until the creation callback fires; details will be in {@link runtime.lastError}.
2048
2054
  * @return The ID of the newly created item.
2049
2055
  */
2050
2056
  function create(createProperties: CreateProperties, callback?: () => void): number | string;
@@ -2053,7 +2059,7 @@ declare namespace chrome {
2053
2059
  * Removes a context menu item.
2054
2060
  * @param menuItemId The ID of the context menu item to remove.
2055
2061
  *
2056
- * Can return its result via Promise since Chrome 123.
2062
+ * Can return its result via Promise in Manifest V3 or later since Chrome 123.
2057
2063
  */
2058
2064
  function remove(menuItemId: string | number): Promise<void>;
2059
2065
  function remove(menuItemId: string | number, callback: () => void): void;
@@ -2061,7 +2067,7 @@ declare namespace chrome {
2061
2067
  /**
2062
2068
  * Removes all context menu items added by this extension.
2063
2069
  *
2064
- * Can return its result via Promise since Chrome 123.
2070
+ * Can return its result via Promise in Manifest V3 or later since Chrome 123.
2065
2071
  */
2066
2072
  function removeAll(): Promise<void>;
2067
2073
  function removeAll(callback: () => void): void;
@@ -2071,7 +2077,7 @@ declare namespace chrome {
2071
2077
  * @param id The ID of the item to update.
2072
2078
  * @param updateProperties The properties to update. Accepts the same values as the {@link contextMenus.create} function.
2073
2079
  *
2074
- * Can return its result via Promise since Chrome 123.
2080
+ * Can return its result via Promise in Manifest V3 or later since Chrome 123.
2075
2081
  */
2076
2082
  function update(id: string | number, updateProperties: Omit<CreateProperties, "id">): Promise<void>;
2077
2083
  function update(
@@ -2095,7 +2101,10 @@ declare namespace chrome {
2095
2101
  * Manifest: "host_permissions"
2096
2102
  */
2097
2103
  export namespace cookies {
2098
- /** 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. */
2104
+ /**
2105
+ * 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.
2106
+ * @since Chrome 51
2107
+ */
2099
2108
  enum SameSiteStatus {
2100
2109
  NO_RESTRICTION = "no_restriction",
2101
2110
  LAX = "lax",
@@ -2248,7 +2257,7 @@ declare namespace chrome {
2248
2257
  documentId?: string | undefined;
2249
2258
  /** The unique identifier for the frame within the tab. */
2250
2259
  frameId?: number | undefined;
2251
- /* The unique identifier for the tab containing the frame. */
2260
+ /** The unique identifier for the tab containing the frame. */
2252
2261
  tabId?: number | undefined;
2253
2262
  }
2254
2263
 
@@ -2286,7 +2295,7 @@ declare namespace chrome {
2286
2295
 
2287
2296
  /**
2288
2297
  * 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 identify the cookie to remove.
2298
+ * @param details Information to filter the cookies being retrieved.
2290
2299
  *
2291
2300
  * Can return its result via Promise in Manifest V3 or later.
2292
2301
  */
@@ -2500,7 +2509,7 @@ declare namespace chrome {
2500
2509
  * 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
2510
  *
2502
2511
  * 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 MV3
2512
+ * @since Chrome 97
2504
2513
  */
2505
2514
  class ShowAction {}
2506
2515
 
@@ -2508,8 +2517,7 @@ declare namespace chrome {
2508
2517
  * 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
2518
  *
2510
2519
  * 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
2520
+ * @deprecated since Chrome 97. Please use {@link declarativeContent.ShowAction}.
2513
2521
  */
2514
2522
  class ShowPageAction {}
2515
2523
 
@@ -2747,6 +2755,7 @@ declare namespace chrome {
2747
2755
 
2748
2756
  /** 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
2757
  interface AddRequestCookie {
2758
+ /** Cookie to be added to the request. No field may be undefined. */
2750
2759
  cookie: RequestCookie;
2751
2760
  }
2752
2761
 
@@ -2793,6 +2802,7 @@ declare namespace chrome {
2793
2802
  url: string;
2794
2803
  }
2795
2804
 
2805
+ /** Triggers the {@link declarativeWebRequest.onMessage} event. */
2796
2806
  interface SendMessageToExtension {
2797
2807
  /** The value that will be passed in the message attribute of the dictionary that is passed to the event handler. */
2798
2808
  message: string;
@@ -3491,9 +3501,9 @@ declare namespace chrome {
3491
3501
  WRONG_TYPE = "WRONG_TYPE",
3492
3502
  /** No more data is available. */
3493
3503
  EOF = "EOF",
3494
- /** The document feeder is jammed */
3504
+ /** The document feeder is jammed. */
3495
3505
  ADF_JAMMED = "ADF_JAMMED",
3496
- /** The document feeder is empty */
3506
+ /** The document feeder is empty. */
3497
3507
  ADF_EMPTY = "ADF_EMPTY",
3498
3508
  /** The flatbed cover is open. */
3499
3509
  COVER_OPEN = "COVER_OPEN",
@@ -3545,7 +3555,7 @@ declare namespace chrome {
3545
3555
  enum OptionType {
3546
3556
  /** The option's data type is `unknown`. The value property will be unset. */
3547
3557
  UNKNOWN = "UNKNOWN",
3548
- /** The `value` property will be one of `true` false. */
3558
+ /** The `value` property will be one of `true` or `false`. */
3549
3559
  BOOL = "BOOL",
3550
3560
  /** A signed 32-bit integer. The `value` property will be long or long[], depending on whether the option takes more than one value. */
3551
3561
  INT = "INT",
@@ -3753,7 +3763,7 @@ declare namespace chrome {
3753
3763
  /**
3754
3764
  * 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
3765
  *
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.
3766
+ * **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
3767
  *
3758
3768
  * 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
3769
  * @param job Active job handle previously returned from {@link startScan}.
@@ -3813,9 +3823,9 @@ declare namespace chrome {
3813
3823
  */
3814
3824
  export namespace dom {
3815
3825
  /**
3816
- * @since Chrome 88
3817
3826
  * Requests chrome to return the open/closed shadow roots else return null.
3818
3827
  * @param element reference of HTMLElement.
3828
+ * @since Chrome 88
3819
3829
  */
3820
3830
  function openOrClosedShadowRoot(element: HTMLElement): ShadowRoot | null;
3821
3831
  }
@@ -4055,7 +4065,7 @@ declare namespace chrome {
4055
4065
  orderBy?: string[] | undefined;
4056
4066
  /** Limits results to {@link DownloadItem} whose `url` matches the given regular expression. */
4057
4067
  urlRegex?: string | undefined;
4058
- /** Limits results to {@link DownloadItem} that ended before the time in ISO 8601 format. */
4068
+ /** Limits results to {@link DownloadItem} that ended before the given ms in ISO 8601 format. */
4059
4069
  endedBefore?: string | undefined;
4060
4070
  /** Limits results to {@link DownloadItem} whose `totalBytes` is greater than the given integer. */
4061
4071
  totalBytesGreater?: number | undefined;
@@ -4085,13 +4095,13 @@ declare namespace chrome {
4085
4095
  id?: number | undefined;
4086
4096
  /** Number of bytes received so far from the host, without considering file compression. */
4087
4097
  bytesReceived?: number | undefined;
4088
- /** Limits results to {@link DownloadItem} that ended after the time in ISO 8601 format. */
4098
+ /** Limits results to {@link DownloadItem} that ended after the given ms in ISO 8601 format. */
4089
4099
  endedAfter?: string | undefined;
4090
4100
  /** Absolute local path. */
4091
4101
  filename?: string | undefined;
4092
4102
  /** Indicates whether the download is progressing, interrupted, or complete. */
4093
4103
  state?: `${State}` | undefined;
4094
- /** Limits results to {@link DownloadItem} that started after the time in ISO 8601 format. */
4104
+ /** Limits results to {@link DownloadItem} that started after the given ms in ISO 8601 format. */
4095
4105
  startedAfter?: string | undefined;
4096
4106
  /** The file's MIME type. */
4097
4107
  mime?: string | undefined;
@@ -4101,7 +4111,7 @@ declare namespace chrome {
4101
4111
  startTime?: string | undefined;
4102
4112
  /** The absolute URL that this download initiated from, before any redirects. */
4103
4113
  url?: string | undefined;
4104
- /** Limits results to {@link DownloadItem} that started before the time in ISO 8601 format. */
4114
+ /** Limits results to {@link DownloadItem} that started before the given ms in ISO 8601 format. */
4105
4115
  startedBefore?: string | undefined;
4106
4116
  /** 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
4117
  limit?: number | undefined;
@@ -4239,9 +4249,10 @@ declare namespace chrome {
4239
4249
 
4240
4250
  /**
4241
4251
  * 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
- * @since Chrome 105
4252
+ * @param options Encapsulate a change to the download UI.
4243
4253
  *
4244
4254
  * Can return its result via Promise in Manifest V3 or later since Chrome 105.
4255
+ * @since Chrome 105
4245
4256
  */
4246
4257
  function setUiOptions(options: UiOptions): Promise<void>;
4247
4258
  function setUiOptions(options: UiOptions, callback: () => void): void;
@@ -4290,7 +4301,7 @@ declare namespace chrome {
4290
4301
  /**
4291
4302
  * 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
4303
  *
4293
- * Only non-extractable keys can be generated. The only supported key type is RSASSA-PKCS1-V1_5 with `modulusLength` up to 2048. 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.
4304
+ * 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
4305
  *
4295
4306
  * 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
4307
  * @since Chrome 97
@@ -4437,6 +4448,8 @@ declare namespace chrome {
4437
4448
  * @param challenge A challenge as emitted by the Verified Access Web API.
4438
4449
  * @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
4450
  * @param callback Called back with the challenge response.
4451
+ *
4452
+ * Can return its result via Promise since Chrome 131.
4440
4453
  * @since Chrome 50
4441
4454
  */
4442
4455
  function challengeUserKey(challenge: ArrayBuffer, registerKey: boolean): Promise<ArrayBuffer>;
@@ -4564,9 +4577,9 @@ declare namespace chrome {
4564
4577
  interface NetworkDetails {
4565
4578
  /** The device's MAC address. */
4566
4579
  macAddress: string;
4567
- /** Optional. The device's local IPv4 address (undefined if not configured). */
4580
+ /** The device's local IPv4 address (undefined if not configured). */
4568
4581
  ipv4?: string | undefined;
4569
- /** Optional. The device's local IPv6 address (undefined if not configured). */
4582
+ /** The device's local IPv6 address (undefined if not configured). */
4570
4583
  ipv6?: string | undefined;
4571
4584
  }
4572
4585
 
@@ -4739,6 +4752,8 @@ declare namespace chrome {
4739
4752
 
4740
4753
  /**
4741
4754
  * 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`.
4755
+ *
4756
+ * MV2 only
4742
4757
  * @deprecated since Chrome 58. Please use {@link runtime.lastError}
4743
4758
  */
4744
4759
  const lastError: runtime.LastError | undefined;
@@ -4748,6 +4763,8 @@ declare namespace chrome {
4748
4763
 
4749
4764
  /**
4750
4765
  * Converts a relative path within an extension install directory to a fully-qualified URL.
4766
+ *
4767
+ * MV2 only
4751
4768
  * @param path A path to a resource within an extension expressed relative to its install directory.
4752
4769
  * @deprecated since Chrome 58. Please use {@link runtime.getURL}
4753
4770
  */
@@ -4952,6 +4969,8 @@ declare namespace chrome {
4952
4969
  * Use the `chrome.fileSystemProvider` API to create file systems, that can be accessible from the file manager on Chrome OS.
4953
4970
  *
4954
4971
  * Permissions: "fileSystemProvider"
4972
+ *
4973
+ * Manifest: "fileSystemProvider"
4955
4974
  * @platform ChromeOS only
4956
4975
  */
4957
4976
  export namespace fileSystemProvider {
@@ -5258,7 +5277,7 @@ declare namespace chrome {
5258
5277
  filePath: string;
5259
5278
  /** Whether the file was opened for reading or writing. */
5260
5279
  mode: `${OpenFileMode}`;
5261
- /** A request ID to be be used by consecutive read/write and close requests. */
5280
+ /** A request ID to be used by consecutive read/write and close requests. */
5262
5281
  openRequestId: number;
5263
5282
  }
5264
5283
 
@@ -5447,7 +5466,7 @@ declare namespace chrome {
5447
5466
  *
5448
5467
  * 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
5468
  *
5450
- * In case of an error, {@link runtime.lastError} will be set will a corresponding error code.
5469
+ * In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
5451
5470
  *
5452
5471
  * Can return its result via Promise since Chrome 96.
5453
5472
  * @since Chrome 45
@@ -5550,7 +5569,7 @@ declare namespace chrome {
5550
5569
  >;
5551
5570
 
5552
5571
  /**
5553
- * 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.
5572
+ * 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
5573
  * @since Chrome 48
5555
5574
  */
5556
5575
  const onExecuteActionRequested: events.Event<
@@ -5931,7 +5950,7 @@ declare namespace chrome {
5931
5950
  genericFamily: `${GenericFamily}`;
5932
5951
  /** The level of control this extension has over the setting. */
5933
5952
  levelOfControl: `${LevelOfControl}`;
5934
- /** Optional. The script code for which the font setting has changed. */
5953
+ /** The script code for which the font setting has changed. */
5935
5954
  script?: `${ScriptCode}`;
5936
5955
  /** The font ID. See the description in {@link getFont}. */
5937
5956
  fontId: string;
@@ -6136,7 +6155,7 @@ declare namespace chrome {
6136
6155
  function register(senderIds: string[], callback: (registrationId: string) => void): void;
6137
6156
 
6138
6157
  /**
6139
- * Unregister the application from FCM.
6158
+ * Unregisters the application from FCM.
6140
6159
  *
6141
6160
  * Can return its result via Promise in Manifest V3 or later since Chrome 116.
6142
6161
  */
@@ -6194,7 +6213,7 @@ declare namespace chrome {
6194
6213
  /** The transition type for this visit from its referrer. */
6195
6214
  transition: `${TransitionType}`;
6196
6215
  /**
6197
- * True if the visit originated on this device. False if it was synced from a different device
6216
+ * True if the visit originated on this device. False if it was synced from a different device.
6198
6217
  * @since Chrome 115
6199
6218
  */
6200
6219
  isLocal: boolean;
@@ -6569,7 +6588,7 @@ declare namespace chrome {
6569
6588
  * 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
6589
  * @param details WebAuth flow options.
6571
6590
  *
6572
- * Can return its result via Promise since Chrome 106
6591
+ * Can return its result via Promise since Chrome 106.
6573
6592
  */
6574
6593
  function launchWebAuthFlow(details: WebAuthFlowDetails): Promise<string | undefined>;
6575
6594
  function launchWebAuthFlow(details: WebAuthFlowDetails, callback: (responseUrl?: string) => void): void;
@@ -6865,7 +6884,10 @@ declare namespace chrome {
6865
6884
  COMPOSITION = "composition",
6866
6885
  }
6867
6886
 
6868
- /** Type of assistive window. */
6887
+ /**
6888
+ * Type of assistive window.
6889
+ * @since Chrome 85
6890
+ */
6869
6891
  enum AssistiveWindowType {
6870
6892
  UNDO = "undo",
6871
6893
  }
@@ -7039,6 +7061,7 @@ declare namespace chrome {
7039
7061
  * Shows/Hides an assistive window with the given properties.
7040
7062
  *
7041
7063
  * Can return its result via Promise in Manifest V3 or later since Chrome 111.
7064
+ * @since Chrome 85
7042
7065
  */
7043
7066
  function setAssistiveWindowProperties(
7044
7067
  parameters: AssistiveWindowPropertiesParameters,
@@ -7052,6 +7075,7 @@ declare namespace chrome {
7052
7075
  * Highlights/Unhighlights a button in an assistive window.
7053
7076
  *
7054
7077
  * Can return its result via Promise in Manifest V3 or later since Chrome 111.
7078
+ * @since Chrome 86
7055
7079
  */
7056
7080
  function setAssistiveWindowButtonHighlighted(
7057
7081
  parameters: AssistiveWindowButtonHighlightedParameters,
@@ -7236,6 +7260,7 @@ declare namespace chrome {
7236
7260
  authorizedEntity: string;
7237
7261
  /**
7238
7262
  * 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.
7263
+ * @since Chrome 46
7239
7264
  * @deprecated since Chrome 89. `options` are deprecated and will be ignored.
7240
7265
  */
7241
7266
  options?: { [key: string]: string };
@@ -7254,6 +7279,7 @@ declare namespace chrome {
7254
7279
  function getToken(getTokenParams: GetTokenParams): Promise<string>;
7255
7280
  function getToken(getTokenParams: GetTokenParams, callback: (token: string) => void): void;
7256
7281
 
7282
+ /** Fired when all the granted tokens need to be refreshed. */
7257
7283
  const onTokenRefresh: events.Event<() => void>;
7258
7284
  }
7259
7285
 
@@ -7390,7 +7416,7 @@ declare namespace chrome {
7390
7416
  }
7391
7417
 
7392
7418
  /**
7393
- * How the extension was installed
7419
+ * How the extension was installed.
7394
7420
  * @since Chrome 44
7395
7421
  */
7396
7422
  enum ExtensionInstallType {
@@ -7584,6 +7610,8 @@ declare namespace chrome {
7584
7610
  ////////////////////
7585
7611
  /**
7586
7612
  * Use the `chrome.mimeHandler` API to handle MIME type streams in third-party extensions.
7613
+ *
7614
+ * Manifest: "mime_types_handler"
7587
7615
  * @since Chrome 151, MV3
7588
7616
  */
7589
7617
  export namespace mimeHandler {
@@ -7610,7 +7638,7 @@ declare namespace chrome {
7610
7638
  /**
7611
7639
  * 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
7640
  *
7613
- * Can return its result via Promise
7641
+ * Can return its result via Promise.
7614
7642
  */
7615
7643
  function abortAndFallbackToNativeHandler(): Promise<void>;
7616
7644
  function abortAndFallbackToNativeHandler(callback: () => void): void;
@@ -7619,12 +7647,16 @@ declare namespace chrome {
7619
7647
  * Reads the persisted options for a MIME type. Returns defaults (enabled=true) if none have been stored.
7620
7648
  * @param mimeType The MIME type whose options to read.
7621
7649
  *
7622
- * Can return its result via Promise
7650
+ * Can return its result via Promise.
7623
7651
  */
7624
7652
  function getMimeHandlerOptions(mimeType: string): Promise<MimeHandlerOptions>;
7625
7653
  function getMimeHandlerOptions(mimeType: string, callback: (options: MimeHandlerOptions) => void): void;
7626
7654
 
7627
- /** Retrieves stream information for the current MIME handler context. Must be called from within a MIME handler extension page. */
7655
+ /**
7656
+ * Retrieves stream information for the current MIME handler context. Must be called from within a MIME handler extension page.
7657
+ *
7658
+ * Can return its result via Promise.
7659
+ */
7628
7660
  function getStreamInfo(): Promise<StreamInfo>;
7629
7661
  function getStreamInfo(callback: (info: StreamInfo) => void): void;
7630
7662
 
@@ -7633,7 +7665,7 @@ declare namespace chrome {
7633
7665
  * @param mimeType The MIME type to configure.
7634
7666
  * @param options The new options to use.
7635
7667
  *
7636
- * Can return its result via Promise
7668
+ * Can return its result via Promise.
7637
7669
  */
7638
7670
  function setMimeHandlerOptions(mimeType: string, options: MimeHandlerOptions): Promise<void>;
7639
7671
  function setMimeHandlerOptions(mimeType: string, options: MimeHandlerOptions, callback: () => void): void;
@@ -7750,7 +7782,7 @@ declare namespace chrome {
7750
7782
  * Clears the specified notification.
7751
7783
  * @param notificationId The id of the notification to be cleared. This is returned by {@link notifications.create} method.
7752
7784
  *
7753
- * Can return its result via Promise since Chrome 116
7785
+ * Can return its result via Promise since Chrome 116.
7754
7786
  */
7755
7787
  function clear(notificationId: string): Promise<boolean>;
7756
7788
  function clear(notificationId: string, callback: (wasCleared: boolean) => void): void;
@@ -7762,7 +7794,7 @@ declare namespace chrome {
7762
7794
  * The `notificationId` parameter is required before Chrome 42.
7763
7795
  * @param options Contents of the notification.
7764
7796
  *
7765
- * Can return its result via Promise since Chrome 116
7797
+ * Can return its result via Promise since Chrome 116.
7766
7798
  */
7767
7799
  function create(notificationId: string, options: NotificationCreateOptions): Promise<string>;
7768
7800
  function create(options: NotificationCreateOptions): Promise<string>;
@@ -7776,7 +7808,7 @@ declare namespace chrome {
7776
7808
  /**
7777
7809
  * Retrieves all the notifications of this app or extension.
7778
7810
  *
7779
- * Can return its result via Promise since Chrome 116
7811
+ * Can return its result via Promise since Chrome 116.
7780
7812
  */
7781
7813
  function getAll(): Promise<{ [key: string]: true }>;
7782
7814
  function getAll(callback: (notifications: { [key: string]: true }) => void): void;
@@ -7784,7 +7816,7 @@ declare namespace chrome {
7784
7816
  /**
7785
7817
  * Retrieves whether the user has enabled notifications from this app or extension.
7786
7818
  *
7787
- * Can return its result via Promise since Chrome 116
7819
+ * Can return its result via Promise since Chrome 116.
7788
7820
  */
7789
7821
  function getPermissionLevel(): Promise<`${PermissionLevel}`>;
7790
7822
  function getPermissionLevel(callback: (level: `${PermissionLevel}`) => void): void;
@@ -7794,7 +7826,7 @@ declare namespace chrome {
7794
7826
  * @param notificationId The id of the notification to be updated. This is returned by {@link notifications.create} method.
7795
7827
  * @param options Contents of the notification to update to.
7796
7828
  *
7797
- * Can return its result via Promise since Chrome 116
7829
+ * Can return its result via Promise since Chrome 116.
7798
7830
  */
7799
7831
  function update(notificationId: string, options: NotificationOptions): Promise<boolean>;
7800
7832
  function update(
@@ -7998,6 +8030,7 @@ declare namespace chrome {
7998
8030
  title: string;
7999
8031
  }
8000
8032
 
8033
+ /** @since Chrome 88 */
8001
8034
  interface TabDetails {
8002
8035
  /** The ID of the tab to query state for. */
8003
8036
  tabId: number;
@@ -8118,8 +8151,10 @@ declare namespace chrome {
8118
8151
  }
8119
8152
 
8120
8153
  /**
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
- * @since Chrome 133
8154
+ * 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.
8155
+ *
8156
+ * Can return its result via Promise.
8157
+ * @since Chrome 133, MV3
8123
8158
  */
8124
8159
  function addHostAccessRequest(request: AddHostAccessRequest): Promise<void>;
8125
8160
  function addHostAccessRequest(request: AddHostAccessRequest, callback: () => void): void;
@@ -8167,7 +8202,9 @@ declare namespace chrome {
8167
8202
 
8168
8203
  /**
8169
8204
  * Removes a host access request, if existent.
8170
- * @since Chrome 133
8205
+ *
8206
+ * Can return its result via Promise.
8207
+ * @since Chrome 133, MV3
8171
8208
  */
8172
8209
  function removeHostAccessRequest(request: RemoveHostAccessRequest): Promise<void>;
8173
8210
  function removeHostAccessRequest(request: RemoveHostAccessRequest, callback: () => void): void;
@@ -8183,7 +8220,7 @@ declare namespace chrome {
8183
8220
  // Platform Keys
8184
8221
  ////////////////////
8185
8222
  /**
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).
8223
+ * 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
8224
  *
8188
8225
  * Permissions: "platformKeys"
8189
8226
  * @platform ChromeOS only
@@ -8250,7 +8287,7 @@ declare namespace chrome {
8250
8287
  /**
8251
8288
  * Passes the key pair of `certificate` for usage with {@link platformKeys.subtleCrypto} to `callback`.
8252
8289
  * @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.
8290
+ * @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
8291
  *
8255
8292
  * Currently, this method only supports the "RSASSA-PKCS1-v1\_5" and "ECDSA" algorithms.
8256
8293
  */
@@ -8300,7 +8337,7 @@ declare namespace chrome {
8300
8337
  */
8301
8338
  export namespace power {
8302
8339
  enum Level {
8303
- /** Prevents the display from being turned off or dimmed, or the system from sleeping in response to user inactivity */
8340
+ /** Prevents the display from being turned off or dimmed, or the system from sleeping in response to user inactivity. */
8304
8341
  DISPLAY = "display",
8305
8342
  /** Prevents the system from sleeping in response to user inactivity. */
8306
8343
  SYSTEM = "system",
@@ -8314,6 +8351,7 @@ declare namespace chrome {
8314
8351
 
8315
8352
  /**
8316
8353
  * 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.
8354
+ *
8317
8355
  * Can return its result via Promise in Manifest V3 or later.
8318
8356
  * @platform ChromeOS only
8319
8357
  * @since Chrome 113
@@ -8353,11 +8391,6 @@ declare namespace chrome {
8353
8391
  INVALID_DATA = "INVALID_DATA",
8354
8392
  }
8355
8393
 
8356
- interface PrinterCapabilities {
8357
- /** Device capabilities in CDD format. */
8358
- capabilities: { [key: string]: unknown };
8359
- }
8360
-
8361
8394
  interface PrintJob {
8362
8395
  /** ID of the printer which should handle the job. */
8363
8396
  printerId: string;
@@ -8418,7 +8451,13 @@ declare namespace chrome {
8418
8451
 
8419
8452
  /** Event fired when print manager requests printer capabilities. */
8420
8453
  const onGetCapabilityRequested: events.Event<
8421
- (printerId: string, resultCallback: (capabilities: PrinterCapabilities) => void) => void
8454
+ (
8455
+ printerId: string,
8456
+ resultCallback: (
8457
+ /** Device capabilities in CDD format. */
8458
+ capabilities: { [key: string]: unknown },
8459
+ ) => void,
8460
+ ) => void
8422
8461
  >;
8423
8462
 
8424
8463
  /** Event fired when print manager requests printing. */
@@ -8432,11 +8471,10 @@ declare namespace chrome {
8432
8471
  ////////////////////
8433
8472
  /**
8434
8473
  * Use the `chrome.printing` API to send print jobs to printers installed on Chromebook.
8435
-
8436
- * Permissions: "printing"
8437
- * @platform ChromeOS only
8438
- * @since Chrome 81
8439
- */
8474
+ * Permissions: "printing"
8475
+ * @platform ChromeOS only
8476
+ * @since Chrome 81
8477
+ */
8440
8478
  export namespace printing {
8441
8479
  interface GetPrinterInfoResponse {
8442
8480
  /** Printer capabilities in [CDD format](https://developers.google.com/cloud-print/docs/cdd#cdd-example). The property may be missing. */
@@ -8555,6 +8593,8 @@ declare namespace chrome {
8555
8593
 
8556
8594
  /**
8557
8595
  * 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}.
8596
+ *
8597
+ * Can return its result via Promise in Manifest V3 or later.
8558
8598
  * @since Chrome 135
8559
8599
  */
8560
8600
  function getJobStatus(jobId: string): Promise<`${JobStatus}`>;
@@ -8774,7 +8814,7 @@ declare namespace chrome {
8774
8814
  /**
8775
8815
  * If enabled, Chrome offers to automatically fill in forms.
8776
8816
  * 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 */
8817
+ * @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
8818
  autofillEnabled: chrome.types.ChromeSetting<boolean>;
8779
8819
 
8780
8820
  /**
@@ -8817,8 +8857,8 @@ declare namespace chrome {
8817
8857
  /** Settings that influence Chrome's handling of network connections in general. */
8818
8858
  const network: {
8819
8859
  /**
8820
- * If enabled, Chrome attempts to speed up your web browsing experience by pre-resolving DNS entries and preemptively opening TCP and SSL connections to servers.
8821
- * This preference only affects actions taken by Chrome's internal prediction service. It does not affect webpage-initiated prefectches or preconnects.
8860
+ * 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.
8861
+ * 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
8862
  * This preference's value is a boolean, defaulting to `true`.
8823
8863
  */
8824
8864
  networkPredictionEnabled: chrome.types.ChromeSetting<boolean>;
@@ -8826,7 +8866,7 @@ declare namespace chrome {
8826
8866
  /**
8827
8867
  * 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
8868
  * This preference's value is of type IPHandlingPolicy, defaulting to `default`.
8829
- * @since Chrome 48
8869
+ * @since Chrome 48
8830
8870
  */
8831
8871
  webRTCIPHandlingPolicy: chrome.types.ChromeSetting<`${IPHandlingPolicy}`>;
8832
8872
  };
@@ -8883,7 +8923,11 @@ declare namespace chrome {
8883
8923
  */
8884
8924
  relatedWebsiteSetsEnabled: chrome.types.ChromeSetting<boolean>;
8885
8925
 
8886
- /** 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. */
8926
+ /**
8927
+ * 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.
8928
+ *
8929
+ * 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.
8930
+ */
8887
8931
  thirdPartyCookiesAllowed: chrome.types.ChromeSetting<boolean>;
8888
8932
 
8889
8933
  /**
@@ -9320,14 +9364,31 @@ declare namespace chrome {
9320
9364
  includeTlsChannelId?: boolean | undefined;
9321
9365
  }
9322
9366
 
9323
- interface InstalledDetails {
9324
- /** The reason that this event is being dispatched. */
9325
- reason: `${OnInstalledReason}`;
9326
- /** Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'. */
9327
- previousVersion?: string;
9328
- /** Indicates the ID of the imported shared module extension which updated. This is present only if 'reason' is 'shared_module_update'. */
9329
- id?: string;
9330
- }
9367
+ type InstalledDetails =
9368
+ | {
9369
+ /** The reason that this event is being dispatched. */
9370
+ reason: `${OnInstalledReason.UPDATE}`;
9371
+ /** Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'. */
9372
+ previousVersion: string;
9373
+ /** Indicates the ID of the imported shared module extension which updated. This is present only if 'reason' is 'shared_module_update'. */
9374
+ id?: undefined;
9375
+ }
9376
+ | {
9377
+ /** The reason that this event is being dispatched. */
9378
+ reason: `${OnInstalledReason.SHARED_MODULE_UPDATE}`;
9379
+ /** Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'. */
9380
+ previousVersion?: undefined;
9381
+ /** Indicates the ID of the imported shared module extension which updated. This is present only if 'reason' is 'shared_module_update'. */
9382
+ id: string;
9383
+ }
9384
+ | {
9385
+ /** The reason that this event is being dispatched. */
9386
+ reason: `${OnInstalledReason.INSTALL}` | `${OnInstalledReason.CHROME_UPDATE}`;
9387
+ /** Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'. */
9388
+ previousVersion?: undefined;
9389
+ /** Indicates the ID of the imported shared module extension which updated. This is present only if 'reason' is 'shared_module_update'. */
9390
+ id?: undefined;
9391
+ };
9331
9392
 
9332
9393
  /**
9333
9394
  * A context hosting extension content.
@@ -9412,7 +9473,7 @@ declare namespace chrome {
9412
9473
  postMessage: (message: any) => void;
9413
9474
  /** Immediately disconnect the port. Calling `disconnect()` on an already-disconnected port has no effect. When a port is disconnected, no new events will be dispatched to this port. */
9414
9475
  disconnect: () => void;
9415
- /** This property will **only** be present on ports passed to {@link runtime.onConnect onConnect} / {@link runtime.onConnectExternal onConnectExternal} / {@link runtime.onConnectExternal onConnectNative} listeners. */
9476
+ /** This property will **only** be present on ports passed to {@link runtime.onConnect onConnect} / {@link runtime.onConnectExternal onConnectExternal} / {@link runtime.onConnectNative onConnectNative} listeners. */
9416
9477
  sender?: MessageSender;
9417
9478
  /** Fired when the port is disconnected from the other end(s). {@link runtime.lastError} may be set if the port was disconnected by an error. If the port is closed via {@link Port.disconnect disconnect}, then this event is _only_ fired on the other end. This event is fired at most once (see also Port lifetime). */
9418
9479
  onDisconnect: events.Event<(port: Port) => void>;
@@ -9555,7 +9616,6 @@ declare namespace chrome {
9555
9616
  ManifestPermission,
9556
9617
  | "debugger"
9557
9618
  | "declarativeNetRequest"
9558
- | "devtools"
9559
9619
  | "experimental"
9560
9620
  | "fontSettings"
9561
9621
  | "geolocation"
@@ -9741,6 +9801,8 @@ declare namespace chrome {
9741
9801
  omnibox?: { keyword: string } | undefined;
9742
9802
  /** Specifies a path to an options.html file for the extension to use as an options page. */
9743
9803
  options_page?: string | undefined;
9804
+ /** URL of the web app that replaces this extension. */
9805
+ replacement_web_app?: string | undefined;
9744
9806
  /** Lists technologies required to use the extension. */
9745
9807
  requirements?: {
9746
9808
  "3D"?: { features?: string[] | undefined } | undefined;
@@ -9756,6 +9818,12 @@ declare namespace chrome {
9756
9818
  short_name?: string | undefined;
9757
9819
  /** Declares a JSON schema for the managed storage area. */
9758
9820
  storage?: { managed_schema: string } | undefined;
9821
+ /**
9822
+ * An array of trial tokens to enable Origin Trial and Deprecation Trial features in extension contexts. You can browse and register for active trials on the active trials page.
9823
+ *
9824
+ * To participate in multiple trials simultaneously, include each token as a separate array entry.
9825
+ */
9826
+ trial_tokens?: string[] | undefined;
9759
9827
  /** Registers the extension as a text to speech engine. */
9760
9828
  tts_engine?: {
9761
9829
  voices: Array<{
@@ -9882,6 +9950,11 @@ declare namespace chrome {
9882
9950
  /** Indicates whether the extension's options page will be opened in a new tab. If set to `false`, the extension's options page is embedded in `chrome://extensions` rather than opened in a new tab. */
9883
9951
  open_in_tab?: boolean | undefined;
9884
9952
  } | undefined;
9953
+ /**
9954
+ * The message serialization format used to communicate with extension pages/content scripts/frames running in this extension. The default value is "json".
9955
+ * @since Chrome 148
9956
+ */
9957
+ message_serialization?: "json" | "structured_clone" | undefined;
9885
9958
  /**
9886
9959
  * Maps MIME types to the extension pages that render them. As of Chrome 151, `application/pdf` is the only MIME type available to public handlers. Declaring an unsupported MIME type causes an installation warning.
9887
9960
  * @since Chrome 151
@@ -10080,7 +10153,7 @@ declare namespace chrome {
10080
10153
  *
10081
10154
  * The precise behavior may depend on your manifest's options_ui or options_page key, or what Chrome happens to support at the time. For example, the page may be opened in a new tab, within chrome://extensions, within an App, or it may just focus an open options page. It will never cause the caller page to reload.
10082
10155
  *
10083
- * If your Extension does not declare an options page, or Chrome failed to create one for some other reason, the callback will set {@link runtime.lastError lastError} .
10156
+ * If your Extension does not declare an options page, or Chrome failed to create one for some other reason, the callback will set {@link runtime.lastError lastError}.
10084
10157
  *
10085
10158
  * Can return its result via Promise in Manifest V3 or later since Chrome 99
10086
10159
  */
@@ -10135,13 +10208,13 @@ declare namespace chrome {
10135
10208
 
10136
10209
  /**
10137
10210
  * Fired when a connection is made from a user script from this extension.
10138
- * @since chrome 115 MV3
10211
+ * @since Chrome 115, MV3
10139
10212
  */
10140
10213
  const onUserScriptConnect: events.Event<(port: Port) => void>;
10141
10214
 
10142
10215
  /**
10143
10216
  * Fired when a message is sent from a user script associated with the same extension.
10144
- * @since chrome 115, MV3
10217
+ * @since Chrome 115, MV3
10145
10218
  */
10146
10219
  const onUserScriptMessage: events.Event<
10147
10220
  (message: any, sender: MessageSender, sendResponse: (response?: any) => void) => void
@@ -10257,7 +10330,10 @@ declare namespace chrome {
10257
10330
  & {
10258
10331
  /** Details specifying the target into which to inject the script. */
10259
10332
  target: InjectionTarget;
10260
- /** The JavaScript "world" to run the script in. Defaults to `ISOLATED`. */
10333
+ /**
10334
+ * The JavaScript "world" to run the script in. Defaults to `ISOLATED`.
10335
+ * @since Chrome 95
10336
+ */
10261
10337
  world?: `${ExecutionWorld}`;
10262
10338
  /**
10263
10339
  * 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.
@@ -10267,20 +10343,32 @@ declare namespace chrome {
10267
10343
  }
10268
10344
  & (
10269
10345
  | {
10270
- /** 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. */
10346
+ /**
10347
+ * 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.
10348
+ * @since Chrome 92
10349
+ */
10271
10350
  func?: never | undefined;
10272
10351
  /** 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. */
10273
10352
  files: string[];
10274
10353
  }
10275
10354
  | ({
10276
- /** 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. */
10355
+ /**
10356
+ * 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.
10357
+ * @since Chrome 92
10358
+ */
10277
10359
  func: () => Result;
10278
10360
  /** 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. */
10279
10361
  files?: never | undefined;
10280
10362
  } | {
10281
- /** The arguments to pass to the provided function. This is only valid if the `func` parameter is specified. These arguments must be JSON-serializable. */
10363
+ /**
10364
+ * The arguments to pass to the provided function. This is only valid if the `func` parameter is specified. These arguments must be JSON-serializable.
10365
+ * @since Chrome 92
10366
+ */
10282
10367
  args: Args;
10283
- /** 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. */
10368
+ /**
10369
+ * 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.
10370
+ * @since Chrome 92
10371
+ */
10284
10372
  func: (...args: Args) => Result;
10285
10373
  /** 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. */
10286
10374
  files?: never | undefined;
@@ -10309,7 +10397,10 @@ declare namespace chrome {
10309
10397
  persistAcrossSessions?: boolean | undefined;
10310
10398
  /** Specifies when JavaScript files are injected into the web page. The preferred and default value is `document_idle`. */
10311
10399
  runAt?: extensionTypes.RunAt | undefined;
10312
- /** The JavaScript "world" to run the script in. Defaults to `ISOLATED`. */
10400
+ /**
10401
+ * he JavaScript "world" to run the script in. Defaults to `ISOLATED`.
10402
+ * @since Chrome 102
10403
+ */
10313
10404
  world?: `${ExecutionWorld}` | undefined;
10314
10405
  }
10315
10406
  & (
@@ -10796,6 +10887,10 @@ declare namespace chrome {
10796
10887
  * Permissions: "system.display"
10797
10888
  */
10798
10889
  export namespace system.display {
10890
+ /**
10891
+ * Layout position, i.e. edge of parent that the display is attached to.
10892
+ * @since 53
10893
+ */
10799
10894
  enum LayoutPosition {
10800
10895
  TOP = "top",
10801
10896
  RIGHT = "right",
@@ -10905,7 +11000,7 @@ declare namespace chrome {
10905
11000
  offset: number;
10906
11001
  }
10907
11002
 
10908
- /** The pairs of point used to calibrate the display. */
11003
+ /** @since Chrome 57 */
10909
11004
  interface TouchCalibrationPairQuad {
10910
11005
  /** First pair of touch and display point required for touch calibration. */
10911
11006
  pair1: TouchCalibrationPair;
@@ -10934,7 +11029,7 @@ declare namespace chrome {
10934
11029
  * This value should indicate the id of the source display to mirror, which must not be the same as the id passed to setDisplayProperties.
10935
11030
  * If set, no other property may be set.
10936
11031
  * @platform ChromeOS only
10937
- * @deprecated Deprecated since Chrome 68. Use ´setMirrorMode´
11032
+ * @deprecated since Chrome 68. Use {@link setMirrorMode} instead.
10938
11033
  */
10939
11034
  mirroringSourceId?: string | undefined;
10940
11035
  /**
@@ -11108,6 +11203,7 @@ declare namespace chrome {
11108
11203
  yearOfManufacture: number;
11109
11204
  }
11110
11205
 
11206
+ /** @since Chrome 65 */
11111
11207
  interface MirrorModeInfo {
11112
11208
  /** The mirror mode that should be set. */
11113
11209
  mode: `${MirrorMode}`;
@@ -11119,6 +11215,7 @@ declare namespace chrome {
11119
11215
 
11120
11216
  /**
11121
11217
  * Requests the information for all attached display devices.
11218
+ *
11122
11219
  * Can return its result via Promise in Manifest V3 or later since Chrome 91.
11123
11220
  * @param flags Options affecting how the information is returned.
11124
11221
  */
@@ -11129,6 +11226,7 @@ declare namespace chrome {
11129
11226
 
11130
11227
  /**
11131
11228
  * Requests the layout info for all displays
11229
+ *
11132
11230
  * Can return its result via Promise in Manifest V3 or later since Chrome 91.
11133
11231
  * @platform ChromeOS only
11134
11232
  * @since Chrome 53
@@ -11137,129 +11235,110 @@ declare namespace chrome {
11137
11235
  function getDisplayLayout(): Promise<DisplayLayout[]>;
11138
11236
 
11139
11237
  /**
11140
- * requires(CrOS Kiosk apps | WebUI) This is only available to Chrome OS Kiosk apps and Web UI.
11141
- * @description
11142
- * Updates the properties for the display specified by `id`,
11143
- * according to the information provided in `info`.
11144
- * On failure, `runtime.lastError` will be set.
11145
- * @platform ChromeOS only
11238
+ * Updates the properties for the display specified by `id`, according to the information provided in `info`. On failure, {@link runtime.lastError} will be set.
11239
+ *
11240
+ * Can return its result via Promise in Manifest V3 or later since Chrome 91.
11146
11241
  * @param id The display's unique identifier.
11147
11242
  * @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`.
11243
+ * @platform ChromeOS only
11148
11244
  */
11149
11245
  function setDisplayProperties(id: string, info: DisplayProperties, callback: () => void): void;
11150
11246
  function setDisplayProperties(id: string, info: DisplayProperties): Promise<void>;
11151
11247
 
11152
11248
  /**
11153
- * Set the layout for all displays.
11154
- * Any display not included will use the default layout.
11155
- * If a layout would overlap or be otherwise invalid it will be adjusted to a valid layout.
11156
- * After layout is resolved, an onDisplayChanged event will be triggered.
11249
+ * 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.
11250
+ *
11157
11251
  * Can return its result via Promise in Manifest V3 or later since Chrome 91.
11252
+ * @param layouts The layout information, required for all displays except the primary display.
11158
11253
  * @platform ChromeOS only
11159
11254
  * @since Chrome 53
11160
- * @param layouts The layout information, required for all displays except the primary display.
11161
11255
  */
11162
11256
  function setDisplayLayout(layouts: DisplayLayout[], callback: () => void): void;
11163
11257
  function setDisplayLayout(layouts: DisplayLayout[]): Promise<void>;
11164
11258
 
11165
11259
  /**
11166
- * Enables/disables the unified desktop feature.
11167
- * If enabled while mirroring is active, the desktop mode will not change until mirroring is turned off.
11168
- * Otherwise, the desktop mode will switch to unified immediately.
11260
+ * 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.
11261
+ * @param enabled True if unified desktop should be enabled.
11169
11262
  * @platform ChromeOS only
11170
11263
  * @since Chrome 46
11171
- * @param enabled True if unified desktop should be enabled.
11172
11264
  */
11173
11265
  function enableUnifiedDesktop(enabled: boolean): void;
11174
11266
 
11175
11267
  /**
11176
- * Starts overscan calibration for a display.
11177
- * This will show an overlay on the screen indicating the current overscan insets.
11178
- * If overscan calibration for display `id` is in progress this will reset calibration.
11268
+ * 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.
11269
+ * @param id The display's unique identifier.
11179
11270
  * @platform ChromeOS only
11180
11271
  * @since Chrome 53
11181
- * @param id The display's unique identifier.
11182
11272
  */
11183
11273
  function overscanCalibrationStart(id: string): void;
11184
11274
 
11185
11275
  /**
11186
- * Adjusts the current overscan insets for a display.
11187
- * Typically this should either move the display along an axis (e.g. left+right have the same value)
11188
- * or scale it along an axis (e.g. top+bottom have opposite values).
11189
- * Each Adjust call is cumulative with previous calls since Start.
11190
- * @platform ChromeOS only
11191
- * @since Chrome 53
11276
+ * 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.
11192
11277
  * @param id The display's unique identifier.
11193
11278
  * @param delta The amount to change the overscan insets.
11279
+ * @platform ChromeOS only
11280
+ * @since Chrome 53
11194
11281
  */
11195
11282
  function overscanCalibrationAdjust(id: string, delta: Insets): void;
11196
11283
 
11197
11284
  /**
11198
11285
  * Resets the overscan insets for a display to the last saved value (i.e before Start was called).
11286
+ * @param id The display's unique identifier.
11199
11287
  * @platform ChromeOS only
11200
11288
  * @since Chrome 53
11201
- * @param id The display's unique identifier.
11202
11289
  */
11203
11290
  function overscanCalibrationReset(id: string): void;
11204
11291
 
11205
11292
  /**
11206
11293
  * Complete overscan adjustments for a display by saving the current values and hiding the overlay.
11294
+ * @param id The display's unique identifier.
11207
11295
  * @platform ChromeOS only
11208
11296
  * @since Chrome 53
11209
- * @param id The display's unique identifier.
11210
11297
  */
11211
11298
  function overscanCalibrationComplete(id: string): void;
11212
11299
 
11213
11300
  /**
11214
- * Displays the native touch calibration UX for the display with `id` as display id.
11215
- * This will show an overlay on the screen with required instructions on how to proceed.
11216
- * The callback will be invoked in case of successful calibration only.
11217
- * If the calibration fails, this will throw an error.
11301
+ * 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.
11302
+ *
11218
11303
  * Can return its result via Promise in Manifest V3 or later since Chrome 91.
11304
+ * @param id The display's unique identifier.
11219
11305
  * @platform ChromeOS only
11220
11306
  * @since Chrome 57
11221
- * @param id The display's unique identifier.
11222
11307
  */
11223
11308
  function showNativeTouchCalibration(id: string, callback: (success: boolean) => void): void;
11224
11309
  function showNativeTouchCalibration(id: string): Promise<boolean>;
11225
11310
 
11226
11311
  /**
11227
- * Starts custom touch calibration for a display.
11228
- * This should be called when using a custom UX for collecting calibration data.
11229
- * If another touch calibration is already in progress this will throw an error.
11312
+ * 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.
11313
+ * @param id The display's unique identifier.
11230
11314
  * @platform ChromeOS only
11231
11315
  * @since Chrome 57
11232
- * @param id The display's unique identifier.
11233
11316
  */
11234
11317
  function startCustomTouchCalibration(id: string): void;
11235
11318
 
11236
11319
  /**
11237
- * Sets the touch calibration pairs for a display.
11238
- * These `pairs` would be used to calibrate the touch screen for display with `id` called in startCustomTouchCalibration().
11239
- * Always call `startCustomTouchCalibration` before calling this method.
11240
- * If another touch calibration is already in progress this will throw an error.
11241
- * @platform ChromeOS only
11242
- * @since Chrome 57
11320
+ * 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.
11243
11321
  * @param pairs The pairs of point used to calibrate the display.
11244
11322
  * @param bounds Bounds of the display when the touch calibration was performed. `bounds.left` and `bounds.top` values are ignored.
11245
- * @throws Error
11323
+ * @platform ChromeOS only
11324
+ * @since Chrome 57
11246
11325
  */
11247
11326
  function completeCustomTouchCalibration(pairs: TouchCalibrationPairQuad, bounds: Bounds): void;
11248
11327
 
11249
11328
  /**
11250
11329
  * 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.
11330
+ * @param id The display's unique identifier.
11251
11331
  * @platform ChromeOS only
11252
11332
  * @since Chrome 57
11253
- * @param id The display's unique identifier.
11254
11333
  */
11255
11334
  function clearTouchCalibration(id: string): void;
11256
11335
 
11257
11336
  /**
11258
- * Sets the display mode to the specified mirror mode.
11259
- * Each call resets the state from previous calls.
11260
- * Calling setDisplayProperties() will fail for the mirroring destination displays.
11261
- * @platform ChromeOS only
11337
+ * 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.
11338
+ *
11339
+ * Can return its result via Promise in Manifest V3 or later since Chrome 91.
11262
11340
  * @param info The information of the mirror mode that should be applied to the display mode.
11341
+ * @platform ChromeOS only
11263
11342
  * @since Chrome 65
11264
11343
  */
11265
11344
  function setMirrorMode(info: MirrorModeInfo, callback: () => void): void;
@@ -11357,6 +11436,7 @@ declare namespace chrome {
11357
11436
  * 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.
11358
11437
  *
11359
11438
  * Can return its result via Promise in Manifest V3 or later since Chrome 116.
11439
+ * @since Chrome 71
11360
11440
  */
11361
11441
  function getMediaStreamId(options?: GetMediaStreamOptions): Promise<string>;
11362
11442
  function getMediaStreamId(callback: (streamId: string) => void): void;
@@ -11385,7 +11465,7 @@ declare namespace chrome {
11385
11465
  interface MutedInfo {
11386
11466
  /** 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. */
11387
11467
  muted: boolean;
11388
- /* The reason the tab was muted or unmuted. Not set if the tab's mute state has never been changed. */
11468
+ /** The reason the tab was muted or unmuted. Not set if the tab's mute state has never been changed. */
11389
11469
  reason?: `${MutedInfoReason}` | undefined;
11390
11470
  /** The ID of the extension that changed the muted state. Not set if an extension was not the reason the muted state last changed. */
11391
11471
  extensionId?: string | undefined;
@@ -11400,7 +11480,7 @@ declare namespace chrome {
11400
11480
  USER = "user",
11401
11481
  /** Tab capture was started, forcing a muted state change. */
11402
11482
  CAPTURE = "capture",
11403
- /** An extension set the muted state. */
11483
+ /** An extension, identified by the extensionId field, set the muted state. */
11404
11484
  EXTENSION = "extension",
11405
11485
  }
11406
11486
 
@@ -11487,14 +11567,20 @@ declare namespace chrome {
11487
11567
  lastAccessed: number;
11488
11568
  }
11489
11569
 
11490
- /** The tab's loading status. */
11570
+ /**
11571
+ * The tab's loading status.
11572
+ * @since Chrome 44
11573
+ */
11491
11574
  enum TabStatus {
11492
11575
  UNLOADED = "unloaded",
11493
11576
  LOADING = "loading",
11494
11577
  COMPLETE = "complete",
11495
11578
  }
11496
11579
 
11497
- /** The type of window. */
11580
+ /**
11581
+ * The type of window.
11582
+ * @since Chrome 44
11583
+ */
11498
11584
  enum WindowType {
11499
11585
  NORMAL = "normal",
11500
11586
  POPUP = "popup",
@@ -11740,7 +11826,10 @@ declare namespace chrome {
11740
11826
  }
11741
11827
 
11742
11828
  interface OnUpdatedInfo {
11743
- /** The tab's new audible state. */
11829
+ /**
11830
+ * The tab's new audible state.
11831
+ * @since Chrome 45
11832
+ */
11744
11833
  audible?: boolean;
11745
11834
  /**
11746
11835
  * The tab's new auto-discardable state.
@@ -11842,7 +11931,7 @@ declare namespace chrome {
11842
11931
  * MV2 only
11843
11932
  * @param tabId The ID of the tab in which to run the script; defaults to the active tab of the current window.
11844
11933
  * @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
11845
- * @deprecated since Chrome 99. Replaced by {@link scripting.executeScript} in Manifest V3.
11934
+ * @deprecated since Chrome 91. Replaced by {@link scripting.executeScript} in Manifest V3.
11846
11935
  */
11847
11936
  function executeScript(details: extensionTypes.InjectDetails): Promise<any[] | undefined>;
11848
11937
  function executeScript(
@@ -11945,7 +12034,7 @@ declare namespace chrome {
11945
12034
  function remove(tabIds: number[], callback: () => void): void;
11946
12035
 
11947
12036
  /**
11948
- * 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.
12037
+ * 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.
11949
12038
  *
11950
12039
  * Can return its result via Promise in Manifest V3 or later since Chrome 88.
11951
12040
  * @param windowId The target window. Defaults to the current window.
@@ -12042,7 +12131,7 @@ declare namespace chrome {
12042
12131
  function connect(tabId: number, connectInfo?: ConnectInfo): runtime.Port;
12043
12132
 
12044
12133
  /**
12045
- * 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.
12134
+ * 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.
12046
12135
  *
12047
12136
  * Can return its result via Promise in Manifest V3 or later since Chrome 88.
12048
12137
  *
@@ -12331,7 +12420,7 @@ declare namespace chrome {
12331
12420
  interface MoveProperties {
12332
12421
  /** The position to move the group to. Use `-1` to place the group at the end of the window. */
12333
12422
  index: number;
12334
- /** 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.windowTypeEnum windows.windowType} type `"normal"`. */
12423
+ /** 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"`. */
12335
12424
  windowId?: number;
12336
12425
  }
12337
12426
 
@@ -12532,7 +12621,10 @@ declare namespace chrome {
12532
12621
  voiceName?: string;
12533
12622
  }
12534
12623
 
12535
- /** @deprecated since Chrome 70. Gender is deprecated and is ignored. */
12624
+ /**
12625
+ * @since Chrome 54
12626
+ * @deprecated since Chrome 70. Gender is deprecated and is ignored.
12627
+ */
12536
12628
  enum VoiceGender {
12537
12629
  FEMALE = "female",
12538
12630
  MALE = "male",
@@ -12541,7 +12633,7 @@ declare namespace chrome {
12541
12633
  /**
12542
12634
  * Gets an array of all available voices.
12543
12635
  *
12544
- * Can return its result via Promise since Chrome Chrome 101
12636
+ * Can return its result via Promise in Manifest V3 or later since Chrome 101.
12545
12637
  */
12546
12638
  function getVoices(): Promise<TtsVoice[]>;
12547
12639
  function getVoices(callback: (voices: TtsVoice[]) => void): void;
@@ -12549,7 +12641,7 @@ declare namespace chrome {
12549
12641
  /**
12550
12642
  * 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.
12551
12643
  *
12552
- * Can return its result via Promise since Chrome Chrome 101
12644
+ * Can return its result via Promise in Manifest V3 or later since Chrome 101.
12553
12645
  */
12554
12646
  function isSpeaking(): Promise<boolean>;
12555
12647
  function isSpeaking(callback: (speaking: boolean) => void): void;
@@ -12563,9 +12655,9 @@ declare namespace chrome {
12563
12655
  /**
12564
12656
  * Speaks text using a text-to-speech engine.
12565
12657
  * @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.
12566
- * @param options Optional. The speech options.
12567
-
12568
- * Can return its result via Promise since Chrome Chrome 101
12658
+ * @param options The speech options.
12659
+ *
12660
+ * Can return its result via Promise in Manifest V3 or later since Chrome 101.
12569
12661
  */
12570
12662
  function speak(utterance: string, options?: TtsOptions): Promise<void>;
12571
12663
  function speak(utterance: string, callback: () => void): void;
@@ -12690,7 +12782,7 @@ declare namespace chrome {
12690
12782
 
12691
12783
  /**
12692
12784
  * @since Chrome 54
12693
- * @deprecated Gender is deprecated and will be ignored.
12785
+ * @deprecated since Chrome 70. Gender is deprecated and will be ignored.
12694
12786
  */
12695
12787
  enum VoiceGender {
12696
12788
  MALE = "male",
@@ -12699,12 +12791,14 @@ declare namespace chrome {
12699
12791
 
12700
12792
  /**
12701
12793
  * 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.
12794
+ * @param status The install status of the language.
12702
12795
  * @since Chrome 132
12703
12796
  */
12704
12797
  function updateLanguage(status: LanguageStatus): void;
12705
12798
 
12706
12799
  /**
12707
12800
  * Called by an engine to update its list of voices. This list overrides any voices declared in this extension's manifest.
12801
+ * @param voices Array of {@link tts.TtsVoice} objects representing the available voices for speech synthesis.
12708
12802
  * @since Chrome 66
12709
12803
  */
12710
12804
  function updateVoices(voices: tts.TtsVoice[]): void;
@@ -12736,13 +12830,13 @@ declare namespace chrome {
12736
12830
  * 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.
12737
12831
  * @since Chrome 92
12738
12832
  */
12739
-
12740
12833
  const onSpeakWithAudioStream: chrome.events.Event<
12741
12834
  (
12742
12835
  utterance: string,
12743
12836
  options: SpeakOptions,
12744
12837
  audioStreamOptions: AudioStreamOptions,
12745
12838
  sendTtsAudio: (audioBufferParams: AudioBuffer) => void,
12839
+ /** @since Chrome 94 */
12746
12840
  sendError: (errorMessage?: string) => void,
12747
12841
  ) => void
12748
12842
  >;
@@ -13043,7 +13137,7 @@ declare namespace chrome {
13043
13137
  }
13044
13138
 
13045
13139
  /**
13046
- * Sets wallpaper to the image at url or wallpaperData with the specified layout
13140
+ * Sets wallpaper to the image at url or wallpaperData with the specified layout.
13047
13141
  *
13048
13142
  * Can return its result via Promise in Manifest V3 or later since Chrome 96.
13049
13143
  */
@@ -13424,7 +13518,7 @@ declare namespace chrome {
13424
13518
  /**
13425
13519
  * Use the `chrome.webRequest` API to observe and analyze traffic and to intercept, block, or modify requests in-flight.
13426
13520
  *
13427
- * Permissions: "webRequest"
13521
+ * Permissions: "webRequest", "webRequestBlocking", "webRequestAuthProvider"
13428
13522
  *
13429
13523
  * Manifest: "host_permissions"
13430
13524
  */
@@ -13721,7 +13815,7 @@ declare namespace chrome {
13721
13815
  requestBody?: {
13722
13816
  /** Errors when obtaining request body data. */
13723
13817
  error?: string;
13724
- /** 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'\]}. */
13818
+ /** 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']}. */
13725
13819
  formData?: { [key: string]: FormDataItem[] };
13726
13820
  /** 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. */
13727
13821
  raw?: UploadData[];
@@ -13763,9 +13857,12 @@ declare namespace chrome {
13763
13857
  * @since Chrome 144
13764
13858
  */
13765
13859
  securityInfo?: SecurityInfo;
13766
- /** Standard HTTP status code returned by the server. */
13860
+ /**
13861
+ * Standard HTTP status code returned by the server.
13862
+ * @since Chrome 43
13863
+ */
13767
13864
  statusCode: number;
13768
- /** 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) or an empty string if there are no headers. */
13865
+ /** 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). */
13769
13866
  statusLine: string;
13770
13867
  }
13771
13868
 
@@ -13794,6 +13891,7 @@ declare namespace chrome {
13794
13891
  function handlerBehaviorChanged(): Promise<void>;
13795
13892
  function handlerBehaviorChanged(callback: () => void): void;
13796
13893
 
13894
+ /** @since Chrome 70 */
13797
13895
  const onActionIgnored: events.Event<
13798
13896
  (details: {
13799
13897
  /** The proposed action which was ignored. */
@@ -13889,7 +13987,7 @@ declare namespace chrome {
13889
13987
  tabs?: chrome.tabs.Tab[] | undefined;
13890
13988
  /** 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. */
13891
13989
  top?: number | undefined;
13892
- /** 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. */
13990
+ /** 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. */
13893
13991
  height?: number | undefined;
13894
13992
  /** 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. */
13895
13993
  width?: number | undefined;
@@ -13969,7 +14067,7 @@ declare namespace chrome {
13969
14067
 
13970
14068
  /**
13971
14069
  * Specifies what type of browser window to create.
13972
- * 'panel' is deprecated and is available only to existing whitelisted extensions on Chrome OS.
14070
+ * 'panel' is deprecated and is available only to existing allowlisted extensions on Chrome OS.
13973
14071
  * @since Chrome 44
13974
14072
  */
13975
14073
  enum CreateType {
@@ -14018,7 +14116,7 @@ declare namespace chrome {
14018
14116
  /** The windowId value that represents the current window. */
14019
14117
  const WINDOW_ID_CURRENT: -2;
14020
14118
 
14021
- /** The windowId value that represents the absence of a Chrome browser window */
14119
+ /** The windowId value that represents the absence of a Chrome browser window. */
14022
14120
  const WINDOW_ID_NONE: -1;
14023
14121
 
14024
14122
  /**
@@ -14146,7 +14244,10 @@ declare namespace chrome {
14146
14244
  */
14147
14245
  const MAX_NUMBER_OF_ENABLED_STATIC_RULESETS: 50;
14148
14246
 
14149
- /** The maximum number of combined dynamic and session scoped rules an extension can add. */
14247
+ /**
14248
+ * The maximum number of combined dynamic and session scoped rules an extension can add.
14249
+ * @deprecated There is no longer a combined limit. See {@link MAX_NUMBER_OF_DYNAMIC_RULES} and {@link MAX_NUMBER_OF_SESSION_RULES}.
14250
+ */
14150
14251
  const MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES: 5000;
14151
14252
 
14152
14253
  /**
@@ -14251,7 +14352,7 @@ declare namespace chrome {
14251
14352
  enum DomainType {
14252
14353
  /** The network request is first party to the frame in which it originated. */
14253
14354
  FIRST_PARTY = "firstParty",
14254
- /* The network request is third party to the frame in which it originated. */
14355
+ /** The network request is third party to the frame in which it originated. */
14255
14356
  THIRD_PARTY = "thirdParty",
14256
14357
  }
14257
14358
 
@@ -14440,7 +14541,7 @@ declare namespace chrome {
14440
14541
  * - Use punycode encoding for internationalized domains.
14441
14542
  * - Sub-domains of the listed domains are also matched.
14442
14543
  * - For requests with no associated top-level frame (e.g. ServiceWorker initiated requests, the request initiator's domain is considered instead.
14443
- * @since Chrome 141
14544
+ * @since Chrome 145
14444
14545
  */
14445
14546
  topDomains?: string[] | undefined;
14446
14547
 
@@ -14453,7 +14554,7 @@ declare namespace chrome {
14453
14554
  * - Use punycode encoding for internationalized domains.
14454
14555
  * - Sub-domains of the listed domains are also excluded.
14455
14556
  * - For requests with no associated top-level frame (e.g. ServiceWorker initiated requests, the request initiator's domain is considered instead.
14456
- * @since Chrome 141
14557
+ * @since Chrome 145
14457
14558
  */
14458
14559
  excludedTopDomains?: string[] | undefined;
14459
14560
 
@@ -14678,7 +14779,10 @@ declare namespace chrome {
14678
14779
  * This preference is persisted across sessions.
14679
14780
  */
14680
14781
  displayActionCountAsBadgeText?: boolean | undefined;
14681
- /** Details of how the tab's action count should be adjusted. */
14782
+ /**
14783
+ * Details of how the tab's action count should be adjusted.
14784
+ * @since Chrome 89
14785
+ */
14682
14786
  tabUpdate?: TabActionCountUpdate | undefined;
14683
14787
  }
14684
14788
 
@@ -14893,7 +14997,7 @@ declare namespace chrome {
14893
14997
  * * This update happens as a single atomic operation: either all specified rules are added and removed, or an error is returned.
14894
14998
  * * These rules are persisted across browser sessions and across extension updates.
14895
14999
  * * Static rules specified as part of the extension package can not be removed using this function.
14896
- * * {@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/#safe_rules) must not exceed {@link MAX_NUMBER_OF_UNSAFE_DYNAMIC_RULES}.
15000
+ * * {@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}.
14897
15001
  *
14898
15002
  * Can return its result via Promise in Manifest V3 or later since Chrome 91.
14899
15003
  */
@@ -14948,13 +15052,13 @@ declare namespace chrome {
14948
15052
  /** @since Chrome 141 */
14949
15053
  type CloseOptions =
14950
15054
  | {
14951
- /** 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. */
15055
+ /** 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. */
14952
15056
  tabId: number;
14953
15057
  /** 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. */
14954
15058
  windowId?: number | undefined;
14955
15059
  }
14956
15060
  | {
14957
- /** 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. */
15061
+ /** 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. */
14958
15062
  tabId?: number | undefined;
14959
15063
  /** 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. */
14960
15064
  windowId: number;
@@ -15052,6 +15156,8 @@ declare namespace chrome {
15052
15156
  /**
15053
15157
  * Closes the extension's side panel. This is a no-op if the panel is already closed.
15054
15158
  * @param options Specifies the context in which to close the side panel.
15159
+ *
15160
+ * Can return its result via Promise in Manifest V3 or later.
15055
15161
  * @since Chrome 141
15056
15162
  */
15057
15163
  function close(options: CloseOptions): Promise<void>;
@@ -15059,6 +15165,8 @@ declare namespace chrome {
15059
15165
 
15060
15166
  /**
15061
15167
  * Returns the side panel's current layout.
15168
+ *
15169
+ * Can return its result via Promise in Manifest V3 or later.
15062
15170
  * @since Chrome 140
15063
15171
  */
15064
15172
  function getLayout(): Promise<PanelLayout>;
@@ -15067,7 +15175,7 @@ declare namespace chrome {
15067
15175
  /**
15068
15176
  * Returns the active panel configuration.
15069
15177
  *
15070
- * Can return its result via Promise.
15178
+ * Can return its result via Promise in Manifest V3 or later.
15071
15179
  * @param options Specifies the context to return the configuration for.
15072
15180
  */
15073
15181
  function getOptions(options: GetPanelOptions): Promise<PanelOptions>;
@@ -15076,7 +15184,7 @@ declare namespace chrome {
15076
15184
  /**
15077
15185
  * Returns the extension's current side panel behavior.
15078
15186
  *
15079
- * Can return its result via Promise.
15187
+ * Can return its result via Promise in Manifest V3 or later.
15080
15188
  */
15081
15189
  function getPanelBehavior(): Promise<PanelBehavior>;
15082
15190
  function getPanelBehavior(callback: (behavior: PanelBehavior) => void): void;
@@ -15084,7 +15192,7 @@ declare namespace chrome {
15084
15192
  /**
15085
15193
  * Opens the side panel for the extension. This may only be called in response to a user action.
15086
15194
  *
15087
- * Can return its result via Promise.
15195
+ * Can return its result via Promise in Manifest V3 or later.
15088
15196
  * @param options Specifies the context in which to open the side panel.
15089
15197
  * @since Chrome 116
15090
15198
  */
@@ -15094,7 +15202,7 @@ declare namespace chrome {
15094
15202
  /**
15095
15203
  * Configures the side panel.
15096
15204
  *
15097
- * Can return its result via Promise.
15205
+ * Can return its result via Promise in Manifest V3 or later.
15098
15206
  * @param options The configuration options to apply to the panel.
15099
15207
  */
15100
15208
  function setOptions(options: PanelOptions): Promise<void>;
@@ -15103,7 +15211,7 @@ declare namespace chrome {
15103
15211
  /**
15104
15212
  * Configures the extension's side panel behavior. This is an upsert operation.
15105
15213
  *
15106
- * Can return its result via Promise.
15214
+ * Can return its result via Promise in Manifest V3 or later.
15107
15215
  * @param behavior The new behavior to be set.
15108
15216
  */
15109
15217
  function setPanelBehavior(behavior: PanelBehavior): Promise<void>;
@@ -15312,14 +15420,17 @@ declare namespace chrome {
15312
15420
  * Registers one or more user scripts for this extension.
15313
15421
  *
15314
15422
  * Can return its result via Promise.
15315
- * @param scripts - Contains a list of user scripts to be registered.
15423
+ * @param scripts Contains a list of user scripts to be registered.
15316
15424
  */
15317
15425
  function register(scripts: RegisteredUserScript[]): Promise<void>;
15318
15426
  function register(scripts: RegisteredUserScript[], callback: () => void): void;
15319
15427
 
15320
15428
  /**
15321
15429
  * 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.
15430
+ *
15431
+ * Can return its result via Promise.
15322
15432
  * @param worldId The ID of the user script world to reset. If omitted, resets the default world's configuration.
15433
+ * @since Chrome 133
15323
15434
  */
15324
15435
  function resetWorldConfiguration(worldId?: string): Promise<void>;
15325
15436
  function resetWorldConfiguration(callback: () => void): void;