@types/chrome 0.2.4 → 0.2.6

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 +231 -102
  3. chrome/package.json +2 -2
chrome/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for chrome (https://developer.chrome.com/
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 31 Jul 2026 19:30:21 GMT
11
+ * Last updated: Thu, 13 Aug 2026 23:14:41 GMT
12
12
  * Dependencies: [@types/filesystem](https://npmjs.com/package/@types/filesystem), [@types/har-format](https://npmjs.com/package/@types/har-format)
13
13
 
14
14
  # Credits
chrome/index.d.ts CHANGED
@@ -168,7 +168,7 @@ declare namespace chrome {
168
168
  interface TitleDetails {
169
169
  /** The string the action should display when moused over. */
170
170
  title: string;
171
- /** Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
171
+ /** Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
172
172
  tabId?: number | undefined;
173
173
  }
174
174
 
@@ -201,12 +201,12 @@ declare namespace chrome {
201
201
 
202
202
  /** @since Chrome 99 */
203
203
  interface OpenPopupOptions {
204
- /** The id of the window to open the action popup in. Defaults to the currently-active window if unspecified. */
204
+ /** The id of the window to open the action popup in. Defaults to the currently-active window if unspecified. */
205
205
  windowId?: number | undefined;
206
206
  }
207
207
 
208
208
  interface TabDetails {
209
- /** The ID of the tab to query state for. If no tab is specified, the non-tab-specific state is returned. */
209
+ /** The ID of the tab to query state for. If no tab is specified, the non-tab-specific state is returned. */
210
210
  tabId?: number | undefined;
211
211
  }
212
212
 
@@ -402,24 +402,24 @@ declare namespace chrome {
402
402
  }
403
403
  & (
404
404
  | {
405
- /** Length of time in minutes after which the {@link onAlarm} event should fire. */
405
+ /** Length of time in minutes after which the {@link onAlarm} event should fire. */
406
406
  delayInMinutes: number;
407
407
  /** If set, the onAlarm event should fire every `periodInMinutes` minutes after the initial event specified by `when` or `delayInMinutes`. If not set, the alarm will only fire once. */
408
408
  periodInMinutes?: number | undefined;
409
409
  /** Time at which the alarm should fire, in milliseconds past the epoch (e.g. `Date.now() + n`). */
410
- when?: never | undefined;
410
+ when?: undefined;
411
411
  }
412
412
  | {
413
- /** Length of time in minutes after which the {@link onAlarm} event should fire. */
413
+ /** Length of time in minutes after which the {@link onAlarm} event should fire. */
414
414
  delayInMinutes?: number | undefined;
415
415
  /** If set, the onAlarm event should fire every `periodInMinutes` minutes after the initial event specified by `when` or `delayInMinutes`. If not set, the alarm will only fire once. */
416
416
  periodInMinutes: number;
417
417
  /** Time at which the alarm should fire, in milliseconds past the epoch (e.g. `Date.now() + n`). */
418
- when?: number | undefined;
418
+ when?: undefined;
419
419
  }
420
420
  | {
421
- /** Length of time in minutes after which the {@link onAlarm} event should fire. */
422
- delayInMinutes?: never | undefined;
421
+ /** Length of time in minutes after which the {@link onAlarm} event should fire. */
422
+ delayInMinutes?: undefined;
423
423
  /** If set, the onAlarm event should fire every `periodInMinutes` minutes after the initial event specified by `when` or `delayInMinutes`. If not set, the alarm will only fire once. */
424
424
  periodInMinutes?: number | undefined;
425
425
  /** Time at which the alarm should fire, in milliseconds past the epoch (e.g. `Date.now() + n`). */
@@ -833,7 +833,7 @@ declare namespace chrome {
833
833
  function removeTree(id: string, callback: () => void): void;
834
834
 
835
835
  interface SearchQuery {
836
- /** A string of words and quoted phrases that are matched against bookmark URLs and titles.*/
836
+ /** A string of words and quoted phrases that are matched against bookmark URLs and titles. */
837
837
  query?: string;
838
838
  /** The URL of the bookmark; matches verbatim. Note that folders have no URL. */
839
839
  url?: string;
@@ -863,7 +863,7 @@ declare namespace chrome {
863
863
  function update(id: string, changes: UpdateChanges): Promise<BookmarkTreeNode>;
864
864
  function update(id: string, changes: UpdateChanges, callback: (result: BookmarkTreeNode) => void): void;
865
865
 
866
- /** Fired when a bookmark or folder changes. **Note:** Currently, only title and url changes trigger this.*/
866
+ /** Fired when a bookmark or folder changes. **Note:** Currently, only title and url changes trigger this. */
867
867
  const onChanged: events.Event<(id: string, changeInfo: { title: string; url?: string }) => void>;
868
868
 
869
869
  /** Fired when the children of a folder have changed their order due to the order being sorted in the UI. This is not called as a result of a move(). */
@@ -875,7 +875,7 @@ declare namespace chrome {
875
875
  /** Fired when a bookmark import session is begun. Expensive observers should ignore onCreated updates until onImportEnded is fired. Observers should still handle other notifications immediately. */
876
876
  const onImportBegan: events.Event<() => void>;
877
877
 
878
- /** Fired when a bookmark import session is ended. */
878
+ /** Fired when a bookmark import session is ended. */
879
879
  const onImportEnded: events.Event<() => void>;
880
880
 
881
881
  /** Fired when a bookmark or folder is moved to a different parent folder. */
@@ -933,7 +933,7 @@ declare namespace chrome {
933
933
  interface TitleDetails {
934
934
  /** The string the browser action should display when moused over. */
935
935
  title: string;
936
- /** Optional. Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
936
+ /** Optional. Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
937
937
  tabId?: number | null | undefined;
938
938
  }
939
939
 
@@ -965,7 +965,7 @@ declare namespace chrome {
965
965
  interface PopupDetails {
966
966
  /** Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
967
967
  tabId?: number | null | undefined;
968
- /** The relative path to the HTML file to show in a popup. If set to the empty string (`''`), no popup is shown.*/
968
+ /** The relative path to the HTML file to show in a popup. If set to the empty string (`''`), no popup is shown. */
969
969
  popup: string;
970
970
  }
971
971
 
@@ -1329,7 +1329,7 @@ declare namespace chrome {
1329
1329
  GENERAL_ERROR = "GENERAL_ERROR",
1330
1330
  }
1331
1331
 
1332
- /** @deprecated Replaced by {@link Algorithm}.*/
1332
+ /** @deprecated Replaced by {@link Algorithm}. */
1333
1333
  enum Hash {
1334
1334
  /** Specifies the MD5 and SHA1 hashing algorithms. */
1335
1335
  MD5_SHA1 = "MD5_SHA1",
@@ -1407,7 +1407,7 @@ declare namespace chrome {
1407
1407
  error?: `${Error}` | undefined;
1408
1408
  }
1409
1409
 
1410
- /** @since Chrome 86 */
1410
+ /** @since Chrome 86 */
1411
1411
  interface SignatureRequest {
1412
1412
  /** Signature algorithm to be used. */
1413
1413
  algorithm: `${Algorithm}`;
@@ -1422,7 +1422,7 @@ declare namespace chrome {
1422
1422
  interface SignRequest {
1423
1423
  /** The DER encoding of a X.509 certificate. The extension must sign `digest` using the associated private key. */
1424
1424
  certificate: ArrayBuffer;
1425
- /** The digest that must be signed. */
1425
+ /** The digest that must be signed. */
1426
1426
  digest: ArrayBuffer;
1427
1427
  /** Refers to the hash algorithm that was used to create `digest`. */
1428
1428
  hash: `${Hash}`;
@@ -1589,7 +1589,7 @@ declare namespace chrome {
1589
1589
  resourceIdentifier?: ResourceIdentifier;
1590
1590
  /** Where to set the setting (default: regular). */
1591
1591
  scope?: `${Scope}`;
1592
- /** The pattern for the secondary URL. Defaults to matching all URLs. For details on the format of a pattern, see Content Setting Patterns.*/
1592
+ /** The pattern for the secondary URL. Defaults to matching all URLs. For details on the format of a pattern, see Content Setting Patterns. */
1593
1593
  secondaryPattern?: string;
1594
1594
  /** The setting applied by this rule. See the description of the individual ContentSetting objects for the possible values. */
1595
1595
  setting: T;
@@ -1700,7 +1700,7 @@ declare namespace chrome {
1700
1700
 
1701
1701
  /** The only content type using resource identifiers is contentSettings.plugins. For more information, see Resource Identifiers. */
1702
1702
  interface ResourceIdentifier {
1703
- /** A human readable description of the resource. */
1703
+ /** A human readable description of the resource. */
1704
1704
  description?: string;
1705
1705
  /** The resource identifier for the given content type. */
1706
1706
  id: string;
@@ -1939,15 +1939,15 @@ declare namespace chrome {
1939
1939
  checked?: boolean;
1940
1940
  /** List of contexts this menu item will appear in. Defaults to `['page']`. */
1941
1941
  contexts?: [`${ContextType}`, ...`${ContextType}`[]];
1942
- /** Restricts the item to apply only to documents or frames whose URL matches one of the given patterns. For details on pattern formats, see Match Patterns. */
1942
+ /** Restricts the item to apply only to documents or frames whose URL matches one of the given patterns. For details on pattern formats, see Match Patterns. */
1943
1943
  documentUrlPatterns?: string[];
1944
- /** Whether this context menu item is enabled or disabled. Defaults to `true`. */
1944
+ /** Whether this context menu item is enabled or disabled. Defaults to `true`. */
1945
1945
  enabled?: boolean;
1946
1946
  /** The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension. */
1947
1947
  id?: string;
1948
- /** The ID of a parent menu item; this makes the item a child of a previously added item. */
1948
+ /** The ID of a parent menu item; this makes the item a child of a previously added item. */
1949
1949
  parentId?: number | string;
1950
- /** Similar to `documentUrlPatterns`, filters based on the `src` attribute of `img`, `audio`, and `video` tags and the `href` attribute of `a` tags. */
1950
+ /** Similar to `documentUrlPatterns`, filters based on the `src` attribute of `img`, `audio`, and `video` tags and the `href` attribute of `a` tags. */
1951
1951
  targetUrlPatterns?: string[];
1952
1952
  /** The text to display in the item; this is _required_ unless `type` is `separator`. When the context is `selection`, use `%s` within the string to show the selected text. For example, if this parameter's value is "Translate '%s' to Pig Latin" and the user selects the word "cool", the context menu item for the selection is "Translate 'cool' to Pig Latin". */
1953
1953
  title?: string;
@@ -1981,7 +1981,7 @@ declare namespace chrome {
1981
1981
  interface OnClickData {
1982
1982
  /** A flag indicating the state of a checkbox or radio item after it is clicked. */
1983
1983
  checked?: boolean;
1984
- /** A flag indicating whether the element is editable (text input, textarea, etc.). */
1984
+ /** A flag indicating whether the element is editable (text input, textarea, etc.). */
1985
1985
  editable: boolean;
1986
1986
  /**
1987
1987
  * The ID of the frame of the element where the context menu was clicked, if it was in a frame.
@@ -1998,7 +1998,7 @@ declare namespace chrome {
1998
1998
  menuItemId: number | string;
1999
1999
  /** The URL of the page where the menu item was clicked. This property is not set if the click occurred in a context where there is no current page, such as in a launcher context menu. */
2000
2000
  pageUrl?: string;
2001
- /** The parent ID, if any, for the item clicked.*/
2001
+ /** The parent ID, if any, for the item clicked. */
2002
2002
  parentMenuItemId?: number | string;
2003
2003
  /** The text for the context selection, if any. */
2004
2004
  selectionText?: string | undefined;
@@ -2063,7 +2063,7 @@ declare namespace chrome {
2063
2063
  * Manifest: "host_permissions"
2064
2064
  */
2065
2065
  export namespace cookies {
2066
- /** 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. **/
2066
+ /** 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. */
2067
2067
  enum SameSiteStatus {
2068
2068
  NO_RESTRICTION = "no_restriction",
2069
2069
  LAX = "lax",
@@ -2314,7 +2314,7 @@ declare namespace chrome {
2314
2314
  * @since Chrome 125
2315
2315
  */
2316
2316
  interface DebuggerSession {
2317
- /** The id of the extension which you intend to debug. Attaching to an extension background page is only possible when the `--silent-debugger-extension-api` command-line switch is used.*/
2317
+ /** The id of the extension which you intend to debug. Attaching to an extension background page is only possible when the `--silent-debugger-extension-api` command-line switch is used. */
2318
2318
  extensionId?: string;
2319
2319
  /** The opaque id of the Chrome DevTools Protocol session. Identifies a child session within the root session identified by tabId, extensionId or targetId. */
2320
2320
  sessionId?: string;
@@ -2349,7 +2349,7 @@ declare namespace chrome {
2349
2349
  title: string;
2350
2350
  /** Target URL. */
2351
2351
  url: string;
2352
- /** Target favicon URL. */
2352
+ /** Target favicon URL. */
2353
2353
  faviconUrl?: string;
2354
2354
  }
2355
2355
 
@@ -2831,11 +2831,28 @@ declare namespace chrome {
2831
2831
  * Manifest: "devtools_page"
2832
2832
  */
2833
2833
  export namespace devtools.inspectedWindow {
2834
+ interface SetContentResult {
2835
+ code: string;
2836
+ description: string;
2837
+ details: string[];
2838
+ isError?: boolean;
2839
+ }
2840
+
2834
2841
  /** A resource within the inspected page, such as a document, a script, or an image. */
2835
2842
  interface Resource {
2836
2843
  /** The URL of the resource. */
2837
2844
  url: string;
2838
- /** Gets the content of the resource. */
2845
+ /**
2846
+ * Gets the content of the resource.
2847
+ *
2848
+ * Can return its result via Promise in Manifest V3 or later since Chrome 151.
2849
+ */
2850
+ getContent(): Promise<{
2851
+ /** Content of the resource (potentially encoded). */
2852
+ content: string;
2853
+ /** Empty if the content is not encoded, encoding name otherwise. Currently, only base64 is supported. */
2854
+ encoding: string;
2855
+ }>;
2839
2856
  getContent(
2840
2857
  callback: (
2841
2858
  /** Content of the resource (potentially encoded). */
@@ -2848,14 +2865,17 @@ declare namespace chrome {
2848
2865
  * Sets the content of the resource.
2849
2866
  * @param content New content of the resource. Only resources with the text type are currently supported.
2850
2867
  * @param commit True if the user has finished editing the resource, and the new content of the resource should be persisted; false if this is a minor change sent in progress of the user editing the resource.
2868
+ *
2869
+ * Can return its result via Promise in Manifest V3 or later since Chrome 151.
2851
2870
  */
2852
2871
  setContent(
2853
2872
  content: string,
2854
2873
  commit: boolean,
2855
- callback?: (
2856
- /** Set to undefined if the resource content was set successfully; describes error otherwise. */
2857
- error?: object,
2858
- ) => void,
2874
+ ): Promise<undefined>;
2875
+ setContent(
2876
+ content: string,
2877
+ commit: boolean,
2878
+ callback: (result: SetContentResult) => void,
2859
2879
  ): void;
2860
2880
  }
2861
2881
 
@@ -2895,7 +2915,13 @@ declare namespace chrome {
2895
2915
  * @param expression An expression to evaluate.
2896
2916
  * @param options The options parameter can contain one or more options.
2897
2917
  * @param callback A function called when evaluation completes.
2918
+ *
2919
+ * Can return its result via Promise in Manifest V3 or later since Chrome 151.
2898
2920
  */
2921
+ function eval<T = { [key: string]: unknown }>(
2922
+ expression: string,
2923
+ options?: EvalOptions,
2924
+ ): Promise<{ result: T; exceptionInfo: EvaluationExceptionInfo }>;
2899
2925
  function eval<T = { [key: string]: unknown }>(
2900
2926
  expression: string,
2901
2927
  callback?: (result: T, exceptionInfo: EvaluationExceptionInfo) => void,
@@ -2906,7 +2932,12 @@ declare namespace chrome {
2906
2932
  callback?: (result: T, exceptionInfo: EvaluationExceptionInfo) => void,
2907
2933
  ): void;
2908
2934
 
2909
- /** Retrieves the list of resources from the inspected page. */
2935
+ /**
2936
+ * Retrieves the list of resources from the inspected page.
2937
+ *
2938
+ * Can return its result via Promise in Manifest V3 or later since Chrome 151.
2939
+ */
2940
+ function getResources(): Promise<Resource[]>;
2910
2941
  function getResources(callback: (resources: Resource[]) => void): void;
2911
2942
 
2912
2943
  /** Fired when a new resource is added to the inspected page. */
@@ -2939,7 +2970,17 @@ declare namespace chrome {
2939
2970
  export namespace devtools.network {
2940
2971
  /** Represents a network request for a document resource (script, image and so on). See HAR Specification for reference. */
2941
2972
  interface Request extends HARFormatEntry {
2942
- /** Returns content of the response body. */
2973
+ /**
2974
+ * Returns content of the response body.
2975
+ *
2976
+ * Can return its result via Promise in Manifest V3 or later since Chrome 151.
2977
+ */
2978
+ getContent(): Promise<{
2979
+ /** Content of the response body (potentially encoded). */
2980
+ content: string;
2981
+ /** Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported. */
2982
+ encoding: string;
2983
+ }>;
2943
2984
  getContent(
2944
2985
  callback: (
2945
2986
  /** Content of the response body (potentially encoded). */
@@ -2950,7 +2991,12 @@ declare namespace chrome {
2950
2991
  ): void;
2951
2992
  }
2952
2993
 
2953
- /** Returns HAR log that contains all known network requests. */
2994
+ /**
2995
+ * Returns HAR log that contains all known network requests.
2996
+ *
2997
+ * Can return its result via Promise in Manifest V3 or later since Chrome 151.
2998
+ */
2999
+ function getHAR(): Promise<HARFormatLog>;
2954
3000
  function getHAR(
2955
3001
  callback: (
2956
3002
  /** A HAR log. See HAR specification for details. */
@@ -3336,7 +3382,7 @@ declare namespace chrome {
3336
3382
  enum OperationResult {
3337
3383
  /** An unknown or generic failure occurred. */
3338
3384
  UNKNOWN = "UNKNOWN",
3339
- /**The operation succeeded. */
3385
+ /** The operation succeeded. */
3340
3386
  SUCCESS = "SUCCESS",
3341
3387
  /** The operation is not supported. */
3342
3388
  UNSUPPORTED = "UNSUPPORTED",
@@ -3519,7 +3565,7 @@ declare namespace chrome {
3519
3565
 
3520
3566
  /** @since Chrome 125 */
3521
3567
  interface SetOptionResult {
3522
- /** Indicates the name of the option that was set. */
3568
+ /** Indicates the name of the option that was set. */
3523
3569
  name: string;
3524
3570
  /** Indicates the result of setting the option. */
3525
3571
  result: `${OperationResult}`;
@@ -3551,7 +3597,7 @@ declare namespace chrome {
3551
3597
  interface StartScanResponse<T> {
3552
3598
  /** If `result` is `SUCCESS`, provides a handle that can be used to read scan data or cancel the job. */
3553
3599
  job?: string;
3554
- /** The result of starting a scan. If the value of this is `SUCCESS`, the `job` property will be populated. */
3600
+ /** The result of starting a scan. If the value of this is `SUCCESS`, the `job` property will be populated. */
3555
3601
  result: `${OperationResult}`;
3556
3602
  /** Provides the same scanner handle that was passed to {@link startScan}. */
3557
3603
  scannerHandle: T;
@@ -5119,7 +5165,7 @@ declare namespace chrome {
5119
5165
  requestId: number;
5120
5166
  }
5121
5167
 
5122
- /** Error codes used by providing extensions in response to requests as well as in case of errors when calling methods of the API. For success, `"OK"` must be used.*/
5168
+ /** Error codes used by providing extensions in response to requests as well as in case of errors when calling methods of the API. For success, `"OK"` must be used. */
5123
5169
  enum ProviderError {
5124
5170
  OK = "OK",
5125
5171
  FAILED = "FAILED",
@@ -5326,7 +5372,7 @@ declare namespace chrome {
5326
5372
  ) => void
5327
5373
  >;
5328
5374
 
5329
- /** Raised when opening a file previously opened with `openRequestId` is requested to be closed.*/
5375
+ /** Raised when opening a file previously opened with `openRequestId` is requested to be closed. */
5330
5376
  const onCloseFileRequested: events.Event<
5331
5377
  (
5332
5378
  options: CloseFileRequestedOptions,
@@ -5771,7 +5817,7 @@ declare namespace chrome {
5771
5817
  genericFamily: `${GenericFamily}`;
5772
5818
  /** The level of control this extension has over the setting. */
5773
5819
  levelOfControl: `${LevelOfControl}`;
5774
- /** Optional. The script code for which the font setting has changed. */
5820
+ /** Optional. The script code for which the font setting has changed. */
5775
5821
  script?: `${ScriptCode}`;
5776
5822
  /** The font ID. See the description in {@link getFont}. */
5777
5823
  fontId: string;
@@ -6230,7 +6276,8 @@ declare namespace chrome {
6230
6276
  /** Gets the browser UI language of the browser. This is different from {@link i18n.getAcceptLanguages} which returns the preferred user languages. */
6231
6277
  function getUILanguage(): string;
6232
6278
 
6233
- /** Detects the language of the provided text using CLD.
6279
+ /**
6280
+ * Detects the language of the provided text using CLD.
6234
6281
  * @param text User input string to be translated.
6235
6282
  *
6236
6283
  * Can return its result via Promise in Manifest V3 or later since Chrome 99.
@@ -6360,14 +6407,17 @@ declare namespace chrome {
6360
6407
  *
6361
6408
  * The Identity API caches access tokens in memory, so it's ok to call getAuthToken non-interactively any time a token is required. The token cache automatically handles expiration.
6362
6409
  *
6363
- * For a good user experience it is important interactive token requests 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, or Chrome sign in screens if they are not signed in, with with no context. In particular, do not use getAuthToken interactively when your app is first launched.
6410
+ * For a good user experience it is important interactive token requests 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, or Chrome sign in screens if they are not signed in, with no context. In particular, do not use getAuthToken interactively when your app is first launched.
6364
6411
  * @param details Token options.
6365
6412
  *
6366
6413
  * Can return its result via Promise since Chrome 105.
6367
6414
  */
6368
6415
  function getAuthToken(details?: TokenDetails): Promise<GetAuthTokenResult>;
6369
- function getAuthToken(details: TokenDetails, callback: (result: GetAuthTokenResult) => void): void;
6370
- function getAuthToken(callback: (result: GetAuthTokenResult) => void): void;
6416
+ function getAuthToken(
6417
+ details: TokenDetails | undefined,
6418
+ callback: (token?: string, grantedScopes?: string[]) => void,
6419
+ ): void;
6420
+ function getAuthToken(callback: (token?: string, grantedScopes?: string[]) => void): void;
6371
6421
 
6372
6422
  /**
6373
6423
  * Retrieves email address and obfuscated gaia id of the user signed into a profile.
@@ -6980,13 +7030,13 @@ declare namespace chrome {
6980
7030
  /** This event is sent when an IME is deactivated. It signals that the IME will no longer be receiving onKeyPress events. */
6981
7031
  const onDeactivated: events.Event<(engineID: string) => void>;
6982
7032
 
6983
- /** This event is sent when the properties of the current InputContext change, such as the the type. It is sent to all extensions that are listening to this event, and enabled by the user. */
7033
+ /** This event is sent when the properties of the current InputContext change, such as the type. It is sent to all extensions that are listening to this event, and enabled by the user. */
6984
7034
  const onInputContextUpdate: events.Event<(context: InputContext) => void>;
6985
7035
 
6986
7036
  /** This event is sent when an IME is activated. It signals that the IME will be receiving onKeyPress events. */
6987
7037
  const onActivate: events.Event<(engineID: string, screen: `${ScreenType}`) => void>;
6988
7038
 
6989
- // /** This event is sent when focus enters a text box. It is sent to all extensions that are listening to this event, and enabled by the user. */
7039
+ /** This event is sent when focus enters a text box. It is sent to all extensions that are listening to this event, and enabled by the user. */
6990
7040
  const onFocus: events.Event<(context: InputContext) => void>;
6991
7041
 
6992
7042
  /** Called when the user selects a menu item */
@@ -7144,7 +7194,7 @@ declare namespace chrome {
7144
7194
  function getSessionState(): Promise<`${SessionState}`>;
7145
7195
  function getSessionState(callback: (sessionState: `${SessionState}`) => void): void;
7146
7196
 
7147
- /** Dispatched when the session state changes. `sessionState` is the new session state.*/
7197
+ /** Dispatched when the session state changes. `sessionState` is the new session state. */
7148
7198
  const onSessionStateChanged: events.Event<(sessionState: `${SessionState}`) => void>;
7149
7199
  }
7150
7200
 
@@ -7415,6 +7465,66 @@ declare namespace chrome {
7415
7465
  const onEnabled: events.Event<(info: ExtensionInfo) => void>;
7416
7466
  }
7417
7467
 
7468
+ ////////////////////
7469
+ // MimeHandler
7470
+ ////////////////////
7471
+ /**
7472
+ * Use the `chrome.mimeHandler` API to handle MIME type streams in third-party extensions.
7473
+ * @since Chrome 151, MV3
7474
+ */
7475
+ export namespace mimeHandler {
7476
+ interface MimeHandlerOptions {
7477
+ /** Whether this handler is active for the given MIME type. */
7478
+ enabled: boolean;
7479
+ }
7480
+
7481
+ interface StreamInfo {
7482
+ /** True if loaded in an embedded context (iframe/embed/object). */
7483
+ embedded: boolean;
7484
+ /** The MIME type of the intercepted content. */
7485
+ mimeType: string;
7486
+ /** The original URL the user navigated to. */
7487
+ originalUrl: string;
7488
+ /** HTTP response headers as key-value pairs. */
7489
+ responseHeaders: { [key: string]: unknown };
7490
+ /** The URL to fetch the stream data from. */
7491
+ streamUrl: string;
7492
+ /** The tab ID containing the document. */
7493
+ tabId: number;
7494
+ }
7495
+
7496
+ /**
7497
+ * 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.
7498
+ *
7499
+ * Can return its result via Promise
7500
+ */
7501
+ function abortAndFallbackToNativeHandler(): Promise<void>;
7502
+ function abortAndFallbackToNativeHandler(callback: () => void): void;
7503
+
7504
+ /**
7505
+ * Reads the persisted options for a MIME type. Returns defaults (enabled=true) if none have been stored.
7506
+ * @param mimeType The MIME type whose options to read.
7507
+ *
7508
+ * Can return its result via Promise
7509
+ */
7510
+ function getMimeHandlerOptions(mimeType: string): Promise<MimeHandlerOptions>;
7511
+ function getMimeHandlerOptions(mimeType: string, callback: (options: MimeHandlerOptions) => void): void;
7512
+
7513
+ /** Retrieves stream information for the current MIME handler context. Must be called from within a MIME handler extension page. */
7514
+ function getStreamInfo(): Promise<StreamInfo>;
7515
+ function getStreamInfo(callback: (info: StreamInfo) => void): void;
7516
+
7517
+ /**
7518
+ * Sets the configuration options for a specified MIME type.
7519
+ * @param mimeType The MIME type to configure.
7520
+ * @param options The new options to use.
7521
+ *
7522
+ * Can return its result via Promise
7523
+ */
7524
+ function setMimeHandlerOptions(mimeType: string, options: MimeHandlerOptions): Promise<void>;
7525
+ function setMimeHandlerOptions(mimeType: string, options: MimeHandlerOptions, callback: () => void): void;
7526
+ }
7527
+
7418
7528
  ////////////////////
7419
7529
  // Notifications
7420
7530
  ////////////////////
@@ -7494,7 +7604,8 @@ declare namespace chrome {
7494
7604
  * **Note:** This value is required for the {@link notifications.create}() method.
7495
7605
  */
7496
7606
  title?: string;
7497
- /** Which type of notification to display.
7607
+ /**
7608
+ * Which type of notification to display.
7498
7609
  *
7499
7610
  * **Note:** This value is required for the {@link notifications.create}() method.
7500
7611
  */
@@ -7958,7 +8069,7 @@ declare namespace chrome {
7958
8069
  // Platform Keys
7959
8070
  ////////////////////
7960
8071
  /**
7961
- * 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 certficate in its custom authentication protocol. E.g. this allows usage of platform managed certificates in third party VPNs (see chrome.vpnProvider).
8072
+ * 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).
7962
8073
  *
7963
8074
  * Permissions: "platformKeys"
7964
8075
  * @platform ChromeOS only
@@ -8120,7 +8231,7 @@ declare namespace chrome {
8120
8231
  enum PrintError {
8121
8232
  /** Specifies that the operation was completed successfully. */
8122
8233
  OK = "OK",
8123
- /** Specifies that a general failure occured. */
8234
+ /** Specifies that a general failure occurred. */
8124
8235
  FAILED = "FAILED",
8125
8236
  /** Specifies that the print ticket is invalid. For example, the ticket is inconsistent with some capabilities, or the extension is not able to handle all settings from the ticket. */
8126
8237
  INVALID_TICKET = "INVALID_TICKET",
@@ -8502,6 +8613,17 @@ declare namespace chrome {
8502
8613
  * Permissions: "privacy"
8503
8614
  */
8504
8615
  export namespace privacy {
8616
+ /**
8617
+ * Categories of Autofill data.
8618
+ * @since Chrome 151
8619
+ */
8620
+ enum AutofillBlockedType {
8621
+ CONTACT_INFO = "contact_info",
8622
+ PAYMENTS = "payments",
8623
+ IDENTITY_DOCS = "identity_docs",
8624
+ TRAVEL = "travel",
8625
+ }
8626
+
8505
8627
  /**
8506
8628
  * The IP handling policy of WebRTC.
8507
8629
  * @since Chrome 48
@@ -8910,7 +9032,7 @@ declare namespace chrome {
8910
9032
  */
8911
9033
  export namespace runtime {
8912
9034
  interface LastError {
8913
- /** Details about the error which occurred. */
9035
+ /** Details about the error which occurred. */
8914
9036
  message?: string;
8915
9037
  }
8916
9038
 
@@ -8946,19 +9068,19 @@ declare namespace chrome {
8946
9068
  * @since Chrome 44
8947
9069
  */
8948
9070
  enum PlatformArch {
8949
- /** Specifies the processer architecture as arm. */
9071
+ /** Specifies the processor architecture as arm. */
8950
9072
  ARM = "arm",
8951
- /** Specifies the processer architecture as arm64. */
9073
+ /** Specifies the processor architecture as arm64. */
8952
9074
  ARM64 = "arm64",
8953
- /** Specifies the processer architecture as x86-32. */
9075
+ /** Specifies the processor architecture as x86-32. */
8954
9076
  X86_32 = "x86-32",
8955
- /** Specifies the processer architecture as x86-64. */
9077
+ /** Specifies the processor architecture as x86-64. */
8956
9078
  X86_64 = "x86-64",
8957
- /** Specifies the processer architecture as mips. */
9079
+ /** Specifies the processor architecture as mips. */
8958
9080
  MIPS = "mips",
8959
- /** Specifies the processer architecture as mips64. */
9081
+ /** Specifies the processor architecture as mips64. */
8960
9082
  MIPS64 = "mips64",
8961
- /** Specifies the processer architecture as riscv64. */
9083
+ /** Specifies the processor architecture as riscv64. */
8962
9084
  RISCV64 = "riscv64",
8963
9085
  }
8964
9086
 
@@ -9065,7 +9187,7 @@ declare namespace chrome {
9065
9187
  contextId: string;
9066
9188
  /** The type of context this corresponds to. */
9067
9189
  contextType: `${ContextType}`;
9068
- /** A UUID for the document associated with this context, or undefined if this context is hosted not in a document.*/
9190
+ /** A UUID for the document associated with this context, or undefined if this context is hosted not in a document. */
9069
9191
  documentId?: string;
9070
9192
  /** The origin of the document associated with this context, or undefined if the context is not hosted in a document. */
9071
9193
  documentOrigin?: string;
@@ -9347,7 +9469,7 @@ declare namespace chrome {
9347
9469
  // Optional
9348
9470
  /** @deprecated As of February 2024, the `author` key is no longer supported by Chrome or the Chrome Web Store. If present, it's silently ignored. */
9349
9471
  author?: { email: string } | undefined;
9350
- /** Defines overrides for selected Chrome settings. */
9472
+ /** Defines overrides for selected Chrome settings. */
9351
9473
  chrome_settings_overrides?: {
9352
9474
  /** The new value for the homepage. */
9353
9475
  homepage?: string | undefined;
@@ -9424,7 +9546,7 @@ declare namespace chrome {
9424
9546
  /** Files app uses above information in order to render related UI elements appropriately. For example, if `configurable` is set to true, then a menu item for configuring volumes will be rendered. Similarly, if `multiple_mounts` is set to true, then Files app will allow to add more than one mount points from the UI. If `watchable` is false, then a refresh button will be rendered. Note, that if possible you should add support for watchers, so changes on the file system can be reflected immediately and automatically. */
9425
9547
  source: "file" | "device" | "network";
9426
9548
  } | undefined;
9427
- /** string specifying a URL for the extension's homepage. If this is undefined, the homepage defaults to the extension's Chrome Web Store page. This field is particularly useful if you host the extension on your own site. */
9549
+ /** string specifying a URL for the extension's homepage. If this is undefined, the homepage defaults to the extension's Chrome Web Store page. This field is particularly useful if you host the extension on your own site. */
9428
9550
  homepage_url?: string | undefined;
9429
9551
  /** Allows resources to be imported into the extension. */
9430
9552
  import?:
@@ -9609,6 +9731,18 @@ declare namespace chrome {
9609
9731
  /** 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. */
9610
9732
  open_in_tab?: boolean | undefined;
9611
9733
  } | undefined;
9734
+ /**
9735
+ * 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.
9736
+ * @since Chrome 151
9737
+ */
9738
+ mime_types_handler?: {
9739
+ "application/pdf": {
9740
+ /** The HTML file to display when a document of the corresponding MIME type is opened. This file must be located within your extension. */
9741
+ handler_url: string;
9742
+ /** Specifies whether to handle documents embedded in `<embed>`, `<object>`, or `<iframe>` elements. Defaults to `false`, meaning the handler only receives top-level navigations. */
9743
+ can_embed?: boolean;
9744
+ };
9745
+ };
9612
9746
  /** Declares optional permissions for your extension. */
9613
9747
  optional_permissions?: ManifestOptionalPermission[] | undefined;
9614
9748
  /** Declares optional host permissions for your extension. */
@@ -10535,9 +10669,9 @@ declare namespace chrome {
10535
10669
  }
10536
10670
 
10537
10671
  interface Bounds {
10538
- /** The x-coordinate of the upper-left corner. */
10672
+ /** The x-coordinate of the upper-left corner. */
10539
10673
  left: number;
10540
- /** The y-coordinate of the upper-left corner. */
10674
+ /** The y-coordinate of the upper-left corner. */
10541
10675
  top: number;
10542
10676
  /** The width of the display in pixels. */
10543
10677
  width: number;
@@ -10767,7 +10901,8 @@ declare namespace chrome {
10767
10901
  dpiX: number;
10768
10902
  /** The number of pixels per inch along the y-axis. */
10769
10903
  dpiY: number;
10770
- /** The display's clockwise rotation in degrees relative to the vertical position.
10904
+ /**
10905
+ * The display's clockwise rotation in degrees relative to the vertical position.
10771
10906
  * Currently exposed only on ChromeOS. Will be set to 0 on other platforms.
10772
10907
  * A value of -1 will be interpreted as auto-rotate when the device is in a physical tablet state.
10773
10908
  * @platform ChromeOS only
@@ -10824,15 +10959,10 @@ declare namespace chrome {
10824
10959
 
10825
10960
  interface MirrorModeInfo {
10826
10961
  /** The mirror mode that should be set. */
10827
- mode?: `${MirrorMode}`;
10828
- }
10829
-
10830
- interface MirrorModeInfoMixed extends MirrorModeInfo {
10831
- /** The mirror mode that should be set. */
10832
- mode: "mixed";
10833
- /** The id of the mirroring source display. */
10962
+ mode: `${MirrorMode}`;
10963
+ /** The id of the mirroring source display. This is only valid for 'mixed'. */
10834
10964
  mirroringSourceId?: string | undefined;
10835
- /** The ids of the mirroring destination displays. */
10965
+ /** The ids of the mirroring destination displays. This is only valid for 'mixed'. */
10836
10966
  mirroringDestinationIds?: string[] | undefined;
10837
10967
  }
10838
10968
 
@@ -10973,8 +11103,8 @@ declare namespace chrome {
10973
11103
  * @param info The information of the mirror mode that should be applied to the display mode.
10974
11104
  * @since Chrome 65
10975
11105
  */
10976
- function setMirrorMode(info: MirrorModeInfo | MirrorModeInfoMixed, callback: () => void): void;
10977
- function setMirrorMode(info: MirrorModeInfo | MirrorModeInfoMixed): Promise<void>;
11106
+ function setMirrorMode(info: MirrorModeInfo, callback: () => void): void;
11107
+ function setMirrorMode(info: MirrorModeInfo): Promise<void>;
10978
11108
 
10979
11109
  /** Fired when anything changes to the display configuration. */
10980
11110
  const onDisplayChanged: chrome.events.Event<() => void>;
@@ -11037,7 +11167,7 @@ declare namespace chrome {
11037
11167
 
11038
11168
  /** @since Chrome 71 */
11039
11169
  interface GetMediaStreamOptions {
11040
- /** Optional tab id of the tab which will later invoke `getUserMedia()` to consume the stream. If not specified then the resulting stream can be used only by the calling extension. The stream can only be used by frames in the given tab whose security origin matches the consumber tab's origin. The tab's origin must be a secure origin, e.g. HTTPS. */
11170
+ /** Optional tab id of the tab which will later invoke `getUserMedia()` to consume the stream. If not specified then the resulting stream can be used only by the calling extension. The stream can only be used by frames in the given tab whose security origin matches the consumer tab's origin. The tab's origin must be a secure origin, e.g. HTTPS. */
11041
11171
  consumerTabId?: number | undefined;
11042
11172
  /** Optional tab id of the tab which will be captured. If not specified then the current active tab will be selected. Only tabs for which the extension has been granted the `activeTab` permission can be used as the target tab. */
11043
11173
  targetTabId?: number | undefined;
@@ -11311,7 +11441,7 @@ declare namespace chrome {
11311
11441
  url?: string | undefined;
11312
11442
  /** Adds or removes the tab from the current selection. */
11313
11443
  highlighted?: boolean | undefined;
11314
- /** Whether the tab should be active. Does not affect whether the window is focused (see {@link windows.update}).*/
11444
+ /** Whether the tab should be active. Does not affect whether the window is focused (see {@link windows.update}). */
11315
11445
  active?: boolean | undefined;
11316
11446
  /**
11317
11447
  * Whether the tab should be selected.
@@ -11848,7 +11978,7 @@ declare namespace chrome {
11848
11978
  * Discards a tab from memory. Discarded tabs are still visible on the tab strip and are reloaded when activated.
11849
11979
  *
11850
11980
  * Can return its result via Promise in Manifest V3 or later since Chrome 88.
11851
- * @param tabId The ID of the tab to be discarded. If specified, the tab is discarded unless it is active or already discarded. If omitted, the browser discards the least important tab. This can fail if no discardable tabs exist..
11981
+ * @param tabId The ID of the tab to be discarded. If specified, the tab is discarded unless it is active or already discarded. If omitted, the browser discards the least important tab. This can fail if no discardable tabs exist.
11852
11982
  * @since Chrome 54
11853
11983
  */
11854
11984
  function discard(tabId?: number): Promise<Tab | undefined>;
@@ -12223,7 +12353,7 @@ declare namespace chrome {
12223
12353
  voiceName?: string;
12224
12354
  }
12225
12355
 
12226
- /** @deprecated since Chrome 70. Gender is deprecated and is ignored.*/
12356
+ /** @deprecated since Chrome 70. Gender is deprecated and is ignored. */
12227
12357
  enum VoiceGender {
12228
12358
  FEMALE = "female",
12229
12359
  MALE = "male",
@@ -12690,7 +12820,7 @@ declare namespace chrome {
12690
12820
  /** Triggered when a configuration created by the extension is removed by the platform. */
12691
12821
  const onConfigRemoved: events.Event<(id: string) => void>;
12692
12822
 
12693
- // /** Triggered when a configuration is created by the platform for the extension. */
12823
+ /** Triggered when a configuration is created by the platform for the extension. */
12694
12824
  const onConfigCreated: events.Event<
12695
12825
  (id: string, name: string, data: { [key: string]: unknown }) => void
12696
12826
  >;
@@ -12776,7 +12906,7 @@ declare namespace chrome {
12776
12906
  interface GetRequest {
12777
12907
  /** The `PublicKeyCredentialRequestOptions` passed to `navigator.credentials.get()`, serialized as a JSON string. The serialization format is compatible with [`PublicKeyCredential.parseRequestOptionsFromJSON()`](https://w3c.github.io/webauthn/#sctn-parseRequestOptionsFromJSON). */
12778
12908
  requestDetailsJson: string;
12779
- /** An opaque identifier for the request. */
12909
+ /** An opaque identifier for the request. */
12780
12910
  requestId: number;
12781
12911
  }
12782
12912
 
@@ -12808,7 +12938,7 @@ declare namespace chrome {
12808
12938
  *
12809
12939
  * The attached extension must call `detach()` once the remote desktop session has ended in order to resume regular WebAuthn request processing. Extensions automatically become detached if they are unloaded.
12810
12940
  *
12811
- * Refer to the `onRemoteSessionStateChange` event for signaling a change of remote session attachment from a native application to to the (possibly suspended) extension.
12941
+ * Refer to the `onRemoteSessionStateChange` event for signaling a change of remote session attachment from a native application to the (possibly suspended) extension.
12812
12942
  */
12813
12943
  function attach(): Promise<string | undefined>;
12814
12944
  function attach(callback: (error?: string | undefined) => void): void;
@@ -12830,7 +12960,7 @@ declare namespace chrome {
12830
12960
  *
12831
12961
  * This method is typically called when the extension detects that a remote desktop session was terminated. Once this method returns, the extension ceases to be the active Web Authentication API request proxy.
12832
12962
  *
12833
- * Refer to the `onRemoteSessionStateChange` event for signaling a change of remote session attachment from a native application to to the (possibly suspended) extension.
12963
+ * Refer to the `onRemoteSessionStateChange` event for signaling a change of remote session attachment from a native application to the (possibly suspended) extension.
12834
12964
  */
12835
12965
  function detach(): Promise<string | undefined>;
12836
12966
  function detach(callback: (error?: string | undefined) => void): void;
@@ -12927,7 +13057,7 @@ declare namespace chrome {
12927
13057
  );
12928
13058
 
12929
13059
  interface GetFrameResultDetails {
12930
- /** The URL currently associated with this frame, if the frame identified by the frameId existed at one point in the given tab. The fact that an URL is associated with a given frameId does not imply that the corresponding frame still exists. */
13060
+ /** The URL currently associated with this frame, if the frame identified by the frameId existed at one point in the given tab. The fact that a URL is associated with a given frameId does not imply that the corresponding frame still exists. */
12931
13061
  url: string;
12932
13062
  /** A UUID of the document loaded. */
12933
13063
  documentId: string;
@@ -13032,7 +13162,7 @@ declare namespace chrome {
13032
13162
  documentId: string;
13033
13163
  /** Cause of the navigation. */
13034
13164
  transitionType: `${TransitionType}`;
13035
- /** A list of transition qualifiers.*/
13165
+ /** A list of transition qualifiers. */
13036
13166
  transitionQualifiers: `${TransitionQualifier}`[];
13037
13167
  }
13038
13168
 
@@ -13083,7 +13213,7 @@ declare namespace chrome {
13083
13213
  /** Fired when a document, including the resources it refers to, is completely loaded and initialized. */
13084
13214
  const onCompleted: WebNavigationEvent<(details: WebNavigationFramedCallbackDetails) => void>;
13085
13215
 
13086
- // /** Fired when the frame's history was updated to a new URL. All future events for that frame will use the updated URL. */
13216
+ /** Fired when the frame's history was updated to a new URL. All future events for that frame will use the updated URL. */
13087
13217
  const onHistoryStateUpdated: WebNavigationEvent<
13088
13218
  (details: WebNavigationTransitionCallbackDetails) => void
13089
13219
  >;
@@ -13093,7 +13223,7 @@ declare namespace chrome {
13093
13223
  (details: WebNavigationSourceCallbackDetails) => void
13094
13224
  >;
13095
13225
 
13096
- /** Fired when the contents of the tab is replaced by a different (usually previously pre-rendered) tab*/
13226
+ /** Fired when the contents of the tab is replaced by a different (usually previously pre-rendered) tab */
13097
13227
  const onTabReplaced: events.Event<(details: WebNavigationReplacementCallbackDetails) => void>;
13098
13228
 
13099
13229
  /** Fired when a navigation is about to occur. */
@@ -13386,7 +13516,7 @@ declare namespace chrome {
13386
13516
  * @since Chrome 43
13387
13517
  */
13388
13518
  statusCode: number;
13389
- /** 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.*/
13519
+ /** 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. */
13390
13520
  statusLine: string;
13391
13521
  }
13392
13522
 
@@ -13401,7 +13531,7 @@ declare namespace chrome {
13401
13531
  responseHeaders?: HttpHeader[];
13402
13532
  /** Standard HTTP status code returned by the server. */
13403
13533
  statusCode: number;
13404
- /** 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.*/
13534
+ /** 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. */
13405
13535
  statusLine: string;
13406
13536
  }
13407
13537
 
@@ -13433,7 +13563,7 @@ declare namespace chrome {
13433
13563
  responseHeaders?: HttpHeader[];
13434
13564
  /** Standard HTTP status code returned by the server. */
13435
13565
  statusCode: number;
13436
- /** 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.*/
13566
+ /** 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. */
13437
13567
  statusLine: string;
13438
13568
  }
13439
13569
 
@@ -13456,7 +13586,7 @@ declare namespace chrome {
13456
13586
  securityInfo?: SecurityInfo;
13457
13587
  /** Standard HTTP status code returned by the server. */
13458
13588
  statusCode: number;
13459
- /** 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.*/
13589
+ /** 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. */
13460
13590
  statusLine: string;
13461
13591
  }
13462
13592
 
@@ -13487,9 +13617,9 @@ declare namespace chrome {
13487
13617
 
13488
13618
  const onActionIgnored: events.Event<
13489
13619
  (details: {
13490
- // The proposed action which was ignored.
13620
+ /** The proposed action which was ignored. */
13491
13621
  action: `${IgnoredActionType}`;
13492
- // The ID of the request. Request IDs are unique within a browser session. As a result, they could be used to relate different events of the same request.
13622
+ /** The ID of the request. Request IDs are unique within a browser session. As a result, they could be used to relate different events of the same request. */
13493
13623
  requestId: string;
13494
13624
  }) => void
13495
13625
  >;
@@ -13534,7 +13664,6 @@ declare namespace chrome {
13534
13664
  ) => BlockingResponse | undefined,
13535
13665
  `${OnAuthRequiredOptions}`[]
13536
13666
  >;
13537
- // const onAuthRequired: WebAuthenticationChallengeEvent;
13538
13667
 
13539
13668
  /** Fired when the first byte of the response body is received. For HTTP requests, this means that the status line and response headers are available. */
13540
13669
  const onResponseStarted: WebRequestEvent<
@@ -14640,13 +14769,13 @@ declare namespace chrome {
14640
14769
  /** @since Chrome 141 */
14641
14770
  type CloseOptions =
14642
14771
  | {
14643
- /** 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. */
14772
+ /** 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. */
14644
14773
  tabId: number;
14645
14774
  /** 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. */
14646
14775
  windowId?: number | undefined;
14647
14776
  }
14648
14777
  | {
14649
- /** 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. */
14778
+ /** 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. */
14650
14779
  tabId?: number | undefined;
14651
14780
  /** 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. */
14652
14781
  windowId: number;
@@ -14666,7 +14795,7 @@ declare namespace chrome {
14666
14795
  /**
14667
14796
  * The tab in which to open the side panel.
14668
14797
  * If the corresponding tab has a tab-specific side panel, the panel will only be open for that tab.
14669
- * If there is not a tab-specific panel, the global panel will be open in the specified tab and any other tabs without a currently-open tab- specific panel.
14798
+ * If there is not a tab-specific panel, the global panel will be open in the specified tab and any other tabs without a currently-open tab-specific panel.
14670
14799
  * This will override any currently-active side panel (global or tab-specific) in the corresponding tab.
14671
14800
  * At least one of this and `windowId` must be provided. */
14672
14801
  tabId?: number | undefined;
@@ -14858,7 +14987,7 @@ declare namespace chrome {
14858
14987
  interface WorldProperties {
14859
14988
  /** Specifies the world csp. The default is the `ISOLATED` world csp. */
14860
14989
  csp?: string | undefined;
14861
- /** Specifies whether messaging APIs are exposed. The default is `false`.*/
14990
+ /** Specifies whether messaging APIs are exposed. The default is `false`. */
14862
14991
  messaging?: boolean | undefined;
14863
14992
  /**
14864
14993
  * Specifies the ID of the specific user script world to update. If not provided, updates the properties of the default user script world. Values with leading underscores (`_`) are reserved.
@@ -14872,7 +15001,7 @@ declare namespace chrome {
14872
15001
  ids?: string[] | undefined;
14873
15002
  }
14874
15003
 
14875
- // /** @since Chrome 135 */
15004
+ /** @since Chrome 135 */
14876
15005
  type InjectionTarget =
14877
15006
  & {
14878
15007
  /** The ID of the tab into which to inject. */
@@ -14910,13 +15039,13 @@ declare namespace chrome {
14910
15039
  allFrames?: boolean | undefined;
14911
15040
  /** Specifies wildcard patterns for pages this user script will NOT be injected into. */
14912
15041
  excludeGlobs?: string[] | undefined;
14913
- /**Excludes pages that this user script would otherwise be injected into. See Match Patterns for more details on the syntax of these strings. */
15042
+ /** Excludes pages that this user script would otherwise be injected into. See Match Patterns for more details on the syntax of these strings. */
14914
15043
  excludeMatches?: string[] | undefined;
14915
15044
  /** The ID of the user script specified in the API call. This property must not start with a '_' as it's reserved as a prefix for generated script IDs. */
14916
15045
  id: string;
14917
15046
  /** Specifies wildcard patterns for pages this user script will be injected into. */
14918
15047
  includeGlobs?: string[] | undefined;
14919
- /** The list of ScriptSource objects defining sources of scripts to be injected into matching pages. This property must be specified for {@link register}, and when specified it must be a non-empty array.*/
15048
+ /** The list of ScriptSource objects defining sources of scripts to be injected into matching pages. This property must be specified for {@link register}, and when specified it must be a non-empty array. */
14920
15049
  js?: ScriptSource[] | undefined;
14921
15050
  /** Specifies which pages this user script will be injected into. See Match Patterns for more details on the syntax of these strings. This property must be specified for {@link register}. */
14922
15051
  matches?: string[] | undefined;
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "TypeScript definitions for chrome",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
6
6
  "license": "MIT",
@@ -94,6 +94,6 @@
94
94
  "@types/har-format": "*"
95
95
  },
96
96
  "peerDependencies": {},
97
- "typesPublisherContentHash": "95d0e80767c8eccf24fb23319a9a50f80476549772d641082f1d22a6a2df3825",
97
+ "typesPublisherContentHash": "2fe4e6bd6602a76d2a720d2d3cef05bd8d097084c464df8f12d0b9a950608fc9",
98
98
  "typeScriptVersion": "5.6"
99
99
  }