@types/chrome 0.0.258 → 0.0.260

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. chrome/README.md +1 -1
  2. chrome/index.d.ts +20 -6
  3. chrome/package.json +2 -2
chrome/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for chrome (http://developer.chrome.com/e
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Wed, 17 Jan 2024 07:06:54 GMT
11
+ * Last updated: Thu, 01 Feb 2024 10:06:59 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
@@ -6345,7 +6345,7 @@ declare namespace chrome.permissions {
6345
6345
  permissions?: string[] | undefined;
6346
6346
  /**
6347
6347
  * Optional.
6348
- * List of origin permissions. Anything listed here must be a subset of a host that appears in the optional_permissions list in the manifest. For example, if http://*.example.com/ or http://* appears in optional_permissions, you can request an origin of http://help.example.com/. Any path is ignored.
6348
+ * List of origin permissions. Anything listed here must be a subset of a host that appears in the optional host permission list in the manifest (optional_permissions in MV2, optional_host_permissions in MV3). For example, if http://*.example.com/ or http://* appears in the optional permissions, you can request an origin of http://help.example.com/. Any path is ignored.
6349
6349
  */
6350
6350
  origins?: string[] | undefined;
6351
6351
  }
@@ -6378,12 +6378,12 @@ declare namespace chrome.permissions {
6378
6378
  */
6379
6379
  export function getAll(callback: (permissions: Permissions) => void): void;
6380
6380
  /**
6381
- * Requests access to the specified permissions. These permissions must be defined in the optional_permissions field of the manifest. If there are any problems requesting the permissions, runtime.lastError will be set.
6381
+ * Requests access to the specified permissions. These permissions must be defined in the optional_permissions or optional_host_permissions (MV3 only) fields of the manifest. If there are any problems requesting the permissions, runtime.lastError will be set.
6382
6382
  * @return A Promise that resolves with boolean: True if the user granted the specified permissions.
6383
6383
  */
6384
6384
  export function request(permissions: Permissions): Promise<boolean>;
6385
6385
  /**
6386
- * Requests access to the specified permissions. These permissions must be defined in the optional_permissions field of the manifest. If there are any problems requesting the permissions, runtime.lastError will be set.
6386
+ * Requests access to the specified permissions. These permissions must be defined in the optional_permissions or optional_host_permissions (MV3 only) fields of the manifest. If there are any problems requesting the permissions, runtime.lastError will be set.
6387
6387
  * Parameter granted: True if the user granted the specified permissions.
6388
6388
  */
6389
6389
  export function request(permissions: Permissions, callback?: (granted: boolean) => void): void;
@@ -7604,6 +7604,7 @@ declare namespace chrome.runtime {
7604
7604
  };
7605
7605
  host_permissions?: string[] | undefined;
7606
7606
  optional_permissions?: ManifestPermissions[] | undefined;
7607
+ optional_host_permissions?: string[] | undefined;
7607
7608
  permissions?: ManifestPermissions[] | undefined;
7608
7609
  web_accessible_resources?: Array<{ resources: string[]; matches: string[] }> | undefined;
7609
7610
  }
@@ -7878,16 +7879,29 @@ declare namespace chrome.scripting {
7878
7879
  /* The JavaScript world for a script to execute within. */
7879
7880
  export type ExecutionWorld = "ISOLATED" | "MAIN";
7880
7881
 
7881
- export interface InjectionResult<T> {
7882
- /* The frame associated with the injection. */
7882
+ export interface InjectionResult<T extends any = any> {
7883
+ /**
7884
+ * The document associated with the injection.
7885
+ * @since Chrome 106.
7886
+ */
7887
+ documentId: string;
7888
+ /**
7889
+ * The frame associated with the injection.
7890
+ * @since Chrome 90.
7891
+ */
7883
7892
  frameId: number;
7884
7893
  /* The result of the script execution. */
7885
- result: T;
7894
+ result?: T | undefined;
7886
7895
  }
7887
7896
 
7888
7897
  export interface InjectionTarget {
7889
7898
  /* Whether the script should inject into all frames within the tab. Defaults to false. This must not be true if frameIds is specified. */
7890
7899
  allFrames?: boolean | undefined;
7900
+ /**
7901
+ * The IDs of specific documentIds to inject into. This must not be set if frameIds is set.
7902
+ * @since Chrome 106.
7903
+ */
7904
+ documentIds?: string[] | undefined;
7891
7905
  /* The IDs of specific frames to inject into. */
7892
7906
  frameIds?: number[] | undefined;
7893
7907
  /* The ID of the tab into which to inject. */
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.0.258",
3
+ "version": "0.0.260",
4
4
  "description": "TypeScript definitions for chrome",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
6
6
  "license": "MIT",
@@ -93,6 +93,6 @@
93
93
  "@types/filesystem": "*",
94
94
  "@types/har-format": "*"
95
95
  },
96
- "typesPublisherContentHash": "581693ead7a4b515a196100a0b909475c8e789d7eccb65e95f3bc6e2faedafc1",
96
+ "typesPublisherContentHash": "24977c2600af976810efe722beae3df8b42fa25f3c116b4f68c2c1e3e65f5e33",
97
97
  "typeScriptVersion": "4.6"
98
98
  }