@types/chrome 0.0.301 → 0.0.303
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 +27 -11
- 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:
|
11
|
+
* Last updated: Sat, 08 Feb 2025 01:29:12 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
@@ -6584,7 +6584,7 @@ declare namespace chrome {
|
|
6584
6584
|
/** The parameters describing the offscreen document to create. */
|
6585
6585
|
export interface CreateParameters {
|
6586
6586
|
/** The reason(s) the extension is creating the offscreen document. */
|
6587
|
-
reasons: Reason[];
|
6587
|
+
reasons: `${Reason}`[];
|
6588
6588
|
/** The (relative) URL to load in the document. */
|
6589
6589
|
url: string;
|
6590
6590
|
/** A developer-provided string that explains, in more detail, the need for the background context. The user agent _may_ use this in display to the user. */
|
@@ -8077,7 +8077,7 @@ declare namespace chrome {
|
|
8077
8077
|
/**
|
8078
8078
|
* The reason that this event is being dispatched.
|
8079
8079
|
*/
|
8080
|
-
reason: OnInstalledReason
|
8080
|
+
reason: `${OnInstalledReason}`;
|
8081
8081
|
/**
|
8082
8082
|
* Optional.
|
8083
8083
|
* Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'.
|
@@ -14236,26 +14236,22 @@ declare namespace chrome {
|
|
14236
14236
|
*/
|
14237
14237
|
export type ExecutionWorld = "MAIN" | "USER_SCRIPT";
|
14238
14238
|
|
14239
|
-
/**
|
14240
|
-
* Properties for configuring the user script world.
|
14241
|
-
*/
|
14242
14239
|
export interface WorldProperties {
|
14243
14240
|
/** Specifies the world csp. The default is the `ISOLATED` world csp. */
|
14244
14241
|
csp?: string;
|
14245
14242
|
/** Specifies whether messaging APIs are exposed. The default is false.*/
|
14246
14243
|
messaging?: boolean;
|
14244
|
+
/**
|
14245
|
+
* 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.
|
14246
|
+
* @since Chrome 133
|
14247
|
+
*/
|
14248
|
+
worldId?: string;
|
14247
14249
|
}
|
14248
14250
|
|
14249
|
-
/**
|
14250
|
-
* Properties for filtering user scripts.
|
14251
|
-
*/
|
14252
14251
|
export interface UserScriptFilter {
|
14253
14252
|
ids?: string[];
|
14254
14253
|
}
|
14255
14254
|
|
14256
|
-
/**
|
14257
|
-
* Properties for a registered user script.
|
14258
|
-
*/
|
14259
14255
|
export interface RegisteredUserScript {
|
14260
14256
|
/** 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. */
|
14261
14257
|
allFrames?: boolean;
|
@@ -14275,6 +14271,11 @@ declare namespace chrome {
|
|
14275
14271
|
runAt?: RunAt;
|
14276
14272
|
/** The JavaScript execution environment to run the script in. The default is `USER_SCRIPT` */
|
14277
14273
|
world?: ExecutionWorld;
|
14274
|
+
/**
|
14275
|
+
* 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.
|
14276
|
+
* @since Chrome 133
|
14277
|
+
*/
|
14278
|
+
worldId?: string;
|
14278
14279
|
}
|
14279
14280
|
|
14280
14281
|
/**
|
@@ -14322,6 +14323,13 @@ declare namespace chrome {
|
|
14322
14323
|
*/
|
14323
14324
|
export function getScripts(filter: UserScriptFilter, callback: (scripts: RegisteredUserScript[]) => void): void;
|
14324
14325
|
|
14326
|
+
/**
|
14327
|
+
* Retrieves all registered world configurations.
|
14328
|
+
* @since Chrome 133
|
14329
|
+
*/
|
14330
|
+
export function getWorldConfigurations(): Promise<WorldProperties[]>;
|
14331
|
+
export function getWorldConfigurations(callback: (worlds: WorldProperties[]) => void): void;
|
14332
|
+
|
14325
14333
|
/**
|
14326
14334
|
* Registers one or more user scripts for this extension.
|
14327
14335
|
*
|
@@ -14337,6 +14345,14 @@ declare namespace chrome {
|
|
14337
14345
|
*/
|
14338
14346
|
export function register(scripts: RegisteredUserScript[], callback: () => void): void;
|
14339
14347
|
|
14348
|
+
/**
|
14349
|
+
* Resets the configuration for a user script world. Any scripts that inject into the world with the specified ID will use the default world configuration.
|
14350
|
+
* @param worldId The ID of the user script world to reset. If omitted, resets the default world's configuration.
|
14351
|
+
*/
|
14352
|
+
export function resetWorldConfiguration(worldId?: string): Promise<void>;
|
14353
|
+
export function resetWorldConfiguration(worldId: string, callback: () => void): void;
|
14354
|
+
export function resetWorldConfiguration(callback: () => void): void;
|
14355
|
+
|
14340
14356
|
/**
|
14341
14357
|
* Unregisters all dynamically-registered user scripts for this extension.
|
14342
14358
|
*
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.303",
|
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": "8a782f9496839a30cef0c1af84aa70a3eca1b91f613b83a9c7fa2b99c06c1803",
|
98
98
|
"typeScriptVersion": "5.0"
|
99
99
|
}
|