chrome-types 0.1.337 → 0.1.339

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. package/_all.d.ts +114 -7
  2. package/index.d.ts +114 -7
  3. package/package.json +2 -2
package/_all.d.ts CHANGED
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- // Generated on Tue Feb 04 2025 22:31:15 GMT+0000 (Coordinated Universal Time)
18
- // Built at a0698282be741d934273bc95ecab6b021562fa6e
17
+ // Generated on Fri Feb 14 2025 22:31:00 GMT+0000 (Coordinated Universal Time)
18
+ // Built at f77835d39ba0b4dabb179df1fe9e02b76e63a36b
19
19
 
20
20
  // Includes all types, including MV2 + Platform Apps APIs.
21
21
 
@@ -28688,7 +28688,7 @@ declare namespace chrome {
28688
28688
  /**
28689
28689
  * Gets one or more items from storage.
28690
28690
  *
28691
- * @chrome-returns-extra since Chrome 88
28691
+ * @chrome-returns-extra since Chrome 95
28692
28692
  * @param keys A single key to get, list of keys to get, or a dictionary specifying default values (see description of the object). An empty list or object will return an empty result object. Pass in `null` to get the entire contents of storage.
28693
28693
  */
28694
28694
  get(
@@ -28740,7 +28740,7 @@ declare namespace chrome {
28740
28740
  /**
28741
28741
  * Gets the amount of space (in bytes) being used by one or more items.
28742
28742
  *
28743
- * @chrome-returns-extra since Chrome 88
28743
+ * @chrome-returns-extra since Chrome 95
28744
28744
  * @param keys A single key or list of keys to get the total usage for. An empty list will return 0. Pass in `null` to get the total usage of all of storage.
28745
28745
  */
28746
28746
  getBytesInUse(
@@ -28769,7 +28769,7 @@ declare namespace chrome {
28769
28769
  /**
28770
28770
  * Sets multiple items.
28771
28771
  *
28772
- * @chrome-returns-extra since Chrome 88
28772
+ * @chrome-returns-extra since Chrome 95
28773
28773
  * @param items
28774
28774
 
28775
28775
  An object which gives each key/value pair to update storage with. Any other key/value pairs in storage will not be affected.
@@ -28801,7 +28801,7 @@ declare namespace chrome {
28801
28801
  /**
28802
28802
  * Removes one or more items from storage.
28803
28803
  *
28804
- * @chrome-returns-extra since Chrome 88
28804
+ * @chrome-returns-extra since Chrome 95
28805
28805
  * @param keys A single key or a list of keys for items to remove.
28806
28806
  */
28807
28807
  remove(
@@ -28825,7 +28825,7 @@ declare namespace chrome {
28825
28825
  /**
28826
28826
  * Removes all items from storage.
28827
28827
  *
28828
- * @chrome-returns-extra since Chrome 88
28828
+ * @chrome-returns-extra since Chrome 95
28829
28829
  */
28830
28830
  clear(): Promise<void>;
28831
28831
 
@@ -34618,6 +34618,89 @@ declare namespace chrome {
34618
34618
  ids?: string[];
34619
34619
  }
34620
34620
 
34621
+ /**
34622
+ * @since Pending
34623
+ */
34624
+ export interface InjectionTarget {
34625
+
34626
+ /**
34627
+ * Whether the script should inject into all frames within the tab. Defaults to false. This must not be true if `frameIds` is specified.
34628
+ */
34629
+ allFrames?: boolean;
34630
+
34631
+ /**
34632
+ * The IDs of specific documentIds to inject into. This must not be set if `frameIds` is set.
34633
+ */
34634
+ documentIds?: string[];
34635
+
34636
+ /**
34637
+ * The IDs of specific frames to inject into.
34638
+ */
34639
+ frameIds?: number[];
34640
+
34641
+ /**
34642
+ * The ID of the tab into which to inject.
34643
+ */
34644
+ tabId: number;
34645
+ }
34646
+
34647
+ /**
34648
+ * @since Pending
34649
+ */
34650
+ export interface InjectionResult {
34651
+
34652
+ /**
34653
+ * The document associated with the injection.
34654
+ */
34655
+ documentId: string;
34656
+
34657
+ /**
34658
+ * The frame associated with the injection.
34659
+ */
34660
+ frameId: number;
34661
+
34662
+ /**
34663
+ * The result of the script execution.
34664
+ */
34665
+ result?: any;
34666
+
34667
+ /**
34668
+ * The error, if any. `error` and `result` are mutually exclusive.
34669
+ */
34670
+ error?: string;
34671
+ }
34672
+
34673
+ /**
34674
+ * @since Pending
34675
+ */
34676
+ export interface UserScriptInjection {
34677
+
34678
+ /**
34679
+ * 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.
34680
+ */
34681
+ injectImmediately?: boolean;
34682
+
34683
+ /**
34684
+ * The list of ScriptSource objects defining sources of scripts to be injected into the target.
34685
+ */
34686
+ js: ScriptSource[];
34687
+
34688
+ /**
34689
+ * Details specifying the target into which to inject the script.
34690
+ */
34691
+ target: InjectionTarget;
34692
+
34693
+ /**
34694
+ * The JavaScript "world" to run the script in. The default is `USER_SCRIPT`.
34695
+ */
34696
+ world?: ExecutionWorld;
34697
+
34698
+ /**
34699
+ * Specifies the user script world ID to execute in. If omitted, the script will execute in the default user script world. Only valid if `world` is omitted or is `USER_SCRIPT`. Values with leading underscores (`_`) are reserved.
34700
+ */
34701
+ worldId?: string;
34702
+ }
34703
+
34621
34704
  export interface WorldProperties {
34622
34705
 
34623
34706
  /**
@@ -34732,6 +34815,30 @@ declare namespace chrome {
34732
34815
  callback?: () => void,
34733
34816
  ): void;
34734
34817
 
34818
+ /**
34819
+ * Injects a script into a target context. By default, the script will be run at `document_idle`, or immediately if the page has already loaded. If the `injectImmediately` property is set, the script will inject without waiting, even if the page has not finished loading. If the script evaluates to a promise, the browser will wait for the promise to settle and return the resulting value.
34820
+ *
34821
+ * @since Pending
34822
+ */
34823
+ export function execute(
34824
+
34825
+ injection: UserScriptInjection,
34826
+ ): Promise<InjectionResult[]>;
34827
+
34828
+ /**
34829
+ * Injects a script into a target context. By default, the script will be run at `document_idle`, or immediately if the page has already loaded. If the `injectImmediately` property is set, the script will inject without waiting, even if the page has not finished loading. If the script evaluates to a promise, the browser will wait for the promise to settle and return the resulting value.
34830
+ *
34831
+ * @since Pending
34832
+ */
34833
+ export function execute(
34834
+
34835
+ injection: UserScriptInjection,
34836
+
34837
+ callback?: (
34838
+ result: InjectionResult[],
34839
+ ) => void,
34840
+ ): void;
34841
+
34735
34842
  /**
34736
34843
  * Configures the `` `USER_SCRIPT` `` execution environment.
34737
34844
  *
package/index.d.ts CHANGED
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- // Generated on Tue Feb 04 2025 22:31:10 GMT+0000 (Coordinated Universal Time)
18
- // Built at a0698282be741d934273bc95ecab6b021562fa6e
17
+ // Generated on Fri Feb 14 2025 22:30:55 GMT+0000 (Coordinated Universal Time)
18
+ // Built at f77835d39ba0b4dabb179df1fe9e02b76e63a36b
19
19
 
20
20
  // Includes MV3+ APIs only.
21
21
 
@@ -22146,7 +22146,7 @@ declare namespace chrome {
22146
22146
  /**
22147
22147
  * Gets one or more items from storage.
22148
22148
  *
22149
- * @chrome-returns-extra since Chrome 88
22149
+ * @chrome-returns-extra since Chrome 95
22150
22150
  * @param keys A single key to get, list of keys to get, or a dictionary specifying default values (see description of the object). An empty list or object will return an empty result object. Pass in `null` to get the entire contents of storage.
22151
22151
  */
22152
22152
  get(
@@ -22198,7 +22198,7 @@ declare namespace chrome {
22198
22198
  /**
22199
22199
  * Gets the amount of space (in bytes) being used by one or more items.
22200
22200
  *
22201
- * @chrome-returns-extra since Chrome 88
22201
+ * @chrome-returns-extra since Chrome 95
22202
22202
  * @param keys A single key or list of keys to get the total usage for. An empty list will return 0. Pass in `null` to get the total usage of all of storage.
22203
22203
  */
22204
22204
  getBytesInUse(
@@ -22227,7 +22227,7 @@ declare namespace chrome {
22227
22227
  /**
22228
22228
  * Sets multiple items.
22229
22229
  *
22230
- * @chrome-returns-extra since Chrome 88
22230
+ * @chrome-returns-extra since Chrome 95
22231
22231
  * @param items
22232
22232
 
22233
22233
  An object which gives each key/value pair to update storage with. Any other key/value pairs in storage will not be affected.
@@ -22259,7 +22259,7 @@ declare namespace chrome {
22259
22259
  /**
22260
22260
  * Removes one or more items from storage.
22261
22261
  *
22262
- * @chrome-returns-extra since Chrome 88
22262
+ * @chrome-returns-extra since Chrome 95
22263
22263
  * @param keys A single key or a list of keys for items to remove.
22264
22264
  */
22265
22265
  remove(
@@ -22283,7 +22283,7 @@ declare namespace chrome {
22283
22283
  /**
22284
22284
  * Removes all items from storage.
22285
22285
  *
22286
- * @chrome-returns-extra since Chrome 88
22286
+ * @chrome-returns-extra since Chrome 95
22287
22287
  */
22288
22288
  clear(): Promise<void>;
22289
22289
 
@@ -27424,6 +27424,89 @@ declare namespace chrome {
27424
27424
  ids?: string[];
27425
27425
  }
27426
27426
 
27427
+ /**
27428
+ * @since Pending
27429
+ */
27430
+ export interface InjectionTarget {
27431
+
27432
+ /**
27433
+ * Whether the script should inject into all frames within the tab. Defaults to false. This must not be true if `frameIds` is specified.
27434
+ */
27435
+ allFrames?: boolean;
27436
+
27437
+ /**
27438
+ * The IDs of specific documentIds to inject into. This must not be set if `frameIds` is set.
27439
+ */
27440
+ documentIds?: string[];
27441
+
27442
+ /**
27443
+ * The IDs of specific frames to inject into.
27444
+ */
27445
+ frameIds?: number[];
27446
+
27447
+ /**
27448
+ * The ID of the tab into which to inject.
27449
+ */
27450
+ tabId: number;
27451
+ }
27452
+
27453
+ /**
27454
+ * @since Pending
27455
+ */
27456
+ export interface InjectionResult {
27457
+
27458
+ /**
27459
+ * The document associated with the injection.
27460
+ */
27461
+ documentId: string;
27462
+
27463
+ /**
27464
+ * The frame associated with the injection.
27465
+ */
27466
+ frameId: number;
27467
+
27468
+ /**
27469
+ * The result of the script execution.
27470
+ */
27471
+ result?: any;
27472
+
27473
+ /**
27474
+ * The error, if any. `error` and `result` are mutually exclusive.
27475
+ */
27476
+ error?: string;
27477
+ }
27478
+
27479
+ /**
27480
+ * @since Pending
27481
+ */
27482
+ export interface UserScriptInjection {
27483
+
27484
+ /**
27485
+ * 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.
27486
+ */
27487
+ injectImmediately?: boolean;
27488
+
27489
+ /**
27490
+ * The list of ScriptSource objects defining sources of scripts to be injected into the target.
27491
+ */
27492
+ js: ScriptSource[];
27493
+
27494
+ /**
27495
+ * Details specifying the target into which to inject the script.
27496
+ */
27497
+ target: InjectionTarget;
27498
+
27499
+ /**
27500
+ * The JavaScript "world" to run the script in. The default is `USER_SCRIPT`.
27501
+ */
27502
+ world?: ExecutionWorld;
27503
+
27504
+ /**
27505
+ * Specifies the user script world ID to execute in. If omitted, the script will execute in the default user script world. Only valid if `world` is omitted or is `USER_SCRIPT`. Values with leading underscores (`_`) are reserved.
27506
+ */
27507
+ worldId?: string;
27508
+ }
27509
+
27427
27510
  export interface WorldProperties {
27428
27511
 
27429
27512
  /**
@@ -27538,6 +27621,30 @@ declare namespace chrome {
27538
27621
  callback?: () => void,
27539
27622
  ): void;
27540
27623
 
27624
+ /**
27625
+ * Injects a script into a target context. By default, the script will be run at `document_idle`, or immediately if the page has already loaded. If the `injectImmediately` property is set, the script will inject without waiting, even if the page has not finished loading. If the script evaluates to a promise, the browser will wait for the promise to settle and return the resulting value.
27626
+ *
27627
+ * @since Pending
27628
+ */
27629
+ export function execute(
27630
+
27631
+ injection: UserScriptInjection,
27632
+ ): Promise<InjectionResult[]>;
27633
+
27634
+ /**
27635
+ * Injects a script into a target context. By default, the script will be run at `document_idle`, or immediately if the page has already loaded. If the `injectImmediately` property is set, the script will inject without waiting, even if the page has not finished loading. If the script evaluates to a promise, the browser will wait for the promise to settle and return the resulting value.
27636
+ *
27637
+ * @since Pending
27638
+ */
27639
+ export function execute(
27640
+
27641
+ injection: UserScriptInjection,
27642
+
27643
+ callback?: (
27644
+ result: InjectionResult[],
27645
+ ) => void,
27646
+ ): void;
27647
+
27541
27648
  /**
27542
27649
  * Configures the `` `USER_SCRIPT` `` execution environment.
27543
27650
  *
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "module",
6
6
  "name": "chrome-types",
7
7
  "config": {
8
- "build-hash": "9ce516266b389ec2"
8
+ "build-hash": "0aeba0e6c7fed3ab"
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
@@ -16,5 +16,5 @@
16
16
  "url": "https://github.com/GoogleChrome/chrome-types/issues"
17
17
  },
18
18
  "homepage": "https://github.com/GoogleChrome/chrome-types",
19
- "version": "0.1.337"
19
+ "version": "0.1.339"
20
20
  }