chrome-types 0.1.338 → 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.
- package/_all.d.ts +109 -2
- package/index.d.ts +109 -2
- 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
|
|
18
|
-
// Built at
|
|
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
|
|
|
@@ -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
|
|
18
|
-
// Built at
|
|
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
|
|
|
@@ -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": "
|
|
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.
|
|
19
|
+
"version": "0.1.339"
|
|
20
20
|
}
|