@types/chrome 0.0.315 → 0.0.317
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.
- chrome/README.md +1 -1
- chrome/index.d.ts +67 -5
- 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:
|
11
|
+
* Last updated: Thu, 24 Apr 2025 16:02:45 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
@@ -8956,7 +8956,7 @@ declare namespace chrome {
|
|
8956
8956
|
default_popup?: string | undefined;
|
8957
8957
|
}
|
8958
8958
|
|
8959
|
-
|
8959
|
+
/** Source: https://developer.chrome.com/docs/extensions/reference/permissions-list */
|
8960
8960
|
export type ManifestPermissions =
|
8961
8961
|
| "accessibilityFeatures.modify"
|
8962
8962
|
| "accessibilityFeatures.read"
|
@@ -9013,11 +9013,11 @@ declare namespace chrome {
|
|
9013
9013
|
| "privacy"
|
9014
9014
|
| "processes"
|
9015
9015
|
| "proxy"
|
9016
|
+
| "readingList"
|
9016
9017
|
| "scripting"
|
9017
9018
|
| "search"
|
9018
9019
|
| "sessions"
|
9019
9020
|
| "sidePanel"
|
9020
|
-
| "signedInDevices"
|
9021
9021
|
| "storage"
|
9022
9022
|
| "system.cpu"
|
9023
9023
|
| "system.display"
|
@@ -9040,6 +9040,23 @@ declare namespace chrome {
|
|
9040
9040
|
| "webRequestBlocking"
|
9041
9041
|
| "webRequestAuthProvider";
|
9042
9042
|
|
9043
|
+
/** Source : https://developer.chrome.com/docs/extensions/reference/api/permissions */
|
9044
|
+
export type ManifestOptionalPermissions = Exclude<
|
9045
|
+
ManifestPermissions,
|
9046
|
+
| "debugger"
|
9047
|
+
| "declarativeNetRequest"
|
9048
|
+
| "devtools"
|
9049
|
+
| "experimental"
|
9050
|
+
| "fontSettings"
|
9051
|
+
| "geolocation"
|
9052
|
+
| "proxy"
|
9053
|
+
| "tts"
|
9054
|
+
| "ttsEngine"
|
9055
|
+
| "unlimitedStorage"
|
9056
|
+
| "wallpaper"
|
9057
|
+
| "webAuthenticationProxy"
|
9058
|
+
>;
|
9059
|
+
|
9043
9060
|
export interface SearchProvider {
|
9044
9061
|
name?: string | undefined;
|
9045
9062
|
keyword?: string | undefined;
|
@@ -9259,8 +9276,8 @@ declare namespace chrome {
|
|
9259
9276
|
}
|
9260
9277
|
| undefined;
|
9261
9278
|
content_security_policy?: string | undefined;
|
9262
|
-
optional_permissions?: string[] | undefined;
|
9263
|
-
permissions?: string[] | undefined;
|
9279
|
+
optional_permissions?: ManifestOptionalPermissions[] | string[] | undefined;
|
9280
|
+
permissions?: ManifestPermissions[] | string[] | undefined;
|
9264
9281
|
web_accessible_resources?: string[] | undefined;
|
9265
9282
|
}
|
9266
9283
|
|
@@ -9295,7 +9312,7 @@ declare namespace chrome {
|
|
9295
9312
|
sandbox?: string;
|
9296
9313
|
};
|
9297
9314
|
host_permissions?: string[] | undefined;
|
9298
|
-
optional_permissions?:
|
9315
|
+
optional_permissions?: ManifestOptionalPermissions[] | undefined;
|
9299
9316
|
optional_host_permissions?: string[] | undefined;
|
9300
9317
|
permissions?: ManifestPermissions[] | undefined;
|
9301
9318
|
web_accessible_resources?: Array<{ resources: string[]; matches: string[] }> | undefined;
|
@@ -14843,6 +14860,18 @@ declare namespace chrome {
|
|
14843
14860
|
*/
|
14844
14861
|
export type ExecutionWorld = "MAIN" | "USER_SCRIPT";
|
14845
14862
|
|
14863
|
+
/** @since Chrome 135 */
|
14864
|
+
export interface InjectionResult {
|
14865
|
+
/** The document associated with the injection. */
|
14866
|
+
documentId: string;
|
14867
|
+
/** The error, if any. `error` and `result` are mutually exclusive. */
|
14868
|
+
error?: string;
|
14869
|
+
/** The frame associated with the injection. */
|
14870
|
+
frameId: number;
|
14871
|
+
/** The result of the script execution. */
|
14872
|
+
result: any;
|
14873
|
+
}
|
14874
|
+
|
14846
14875
|
export interface WorldProperties {
|
14847
14876
|
/** Specifies the world csp. The default is the `ISOLATED` world csp. */
|
14848
14877
|
csp?: string;
|
@@ -14859,6 +14888,18 @@ declare namespace chrome {
|
|
14859
14888
|
ids?: string[];
|
14860
14889
|
}
|
14861
14890
|
|
14891
|
+
/** @since Chrome 135 */
|
14892
|
+
export interface InjectionTarget {
|
14893
|
+
/** Whether the script should inject into all frames within the tab. Defaults to false. This must not be true if `frameIds` is specified. */
|
14894
|
+
allFrames?: boolean;
|
14895
|
+
/** The IDs of specific documentIds to inject into. This must not be set if `frameIds` is set. */
|
14896
|
+
documentIds?: string[];
|
14897
|
+
/** The IDs of specific frames to inject into. */
|
14898
|
+
frameIds?: number[];
|
14899
|
+
/** The ID of the tab into which to inject. */
|
14900
|
+
tabId: number;
|
14901
|
+
}
|
14902
|
+
|
14862
14903
|
export interface RegisteredUserScript {
|
14863
14904
|
/** If true, it will inject into all frames, even if the frame is not the top-most frame in the tab. Each frame is checked independently for URL requirements; it will not inject into child frames if the URL requirements are not met. Defaults to false, meaning that only the top frame is matched. */
|
14864
14905
|
allFrames?: boolean;
|
@@ -14885,6 +14926,20 @@ declare namespace chrome {
|
|
14885
14926
|
worldId?: string;
|
14886
14927
|
}
|
14887
14928
|
|
14929
|
+
/** @since Chrome 135 */
|
14930
|
+
export interface UserScriptInjection {
|
14931
|
+
/** 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. */
|
14932
|
+
injectImmediately?: boolean;
|
14933
|
+
/** The list of ScriptSource objects defining sources of scripts to be injected into the target. */
|
14934
|
+
js: ScriptSource[];
|
14935
|
+
/** Details specifying the target into which to inject the script. */
|
14936
|
+
target: InjectionTarget;
|
14937
|
+
/** The JavaScript "world" to run the script in. The default is `USER_SCRIPT`. */
|
14938
|
+
world?: ExecutionWorld;
|
14939
|
+
/** 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. */
|
14940
|
+
worldId?: string;
|
14941
|
+
}
|
14942
|
+
|
14888
14943
|
/**
|
14889
14944
|
* Properties for a script source.
|
14890
14945
|
*/
|
@@ -14937,6 +14992,13 @@ declare namespace chrome {
|
|
14937
14992
|
export function getWorldConfigurations(): Promise<WorldProperties[]>;
|
14938
14993
|
export function getWorldConfigurations(callback: (worlds: WorldProperties[]) => void): void;
|
14939
14994
|
|
14995
|
+
/**
|
14996
|
+
* 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.
|
14997
|
+
* @since Chrome 135
|
14998
|
+
*/
|
14999
|
+
export function execute(injection: UserScriptInjection): Promise<InjectionResult[]>;
|
15000
|
+
export function execute(injection: UserScriptInjection, callback: (result: InjectionResult[]) => void): void;
|
15001
|
+
|
14940
15002
|
/**
|
14941
15003
|
* Registers one or more user scripts for this extension.
|
14942
15004
|
*
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.317",
|
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": "
|
97
|
+
"typesPublisherContentHash": "51383207b6d9937576adc2f632282ec8fd885e1ba1012d8b479079f2640cc452",
|
98
98
|
"typeScriptVersion": "5.1"
|
99
99
|
}
|