@types/chrome 0.0.256 → 0.0.257
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 +73 -0
- 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: Tue, 16 Jan 2024 18:07:41 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
@@ -6957,6 +6957,14 @@ declare namespace chrome.runtime {
|
|
6957
6957
|
export type PlatformArch = "arm" | "arm64" | "x86-32" | "x86-64" | "mips" | "mips64";
|
6958
6958
|
/** https://developer.chrome.com/docs/extensions/reference/runtime/#type-PlatformNaclArch */
|
6959
6959
|
export type PlatformNaclArch = "arm" | "x86-32" | "x86-64" | "mips" | "mips64";
|
6960
|
+
/** https://developer.chrome.com/docs/extensions/reference/api/runtime#type-ContextFilter */
|
6961
|
+
export enum ContextType {
|
6962
|
+
TAB = "TAB",
|
6963
|
+
POPUP = "POPUP",
|
6964
|
+
BACKGROUND = "BACKGROUND",
|
6965
|
+
OFFSCREEN_DOCUMENT = "OFFSCREEN_DOCUMENT",
|
6966
|
+
SIDE_PANEL = "SIDE_PANEL",
|
6967
|
+
}
|
6960
6968
|
/** https://developer.chrome.com/docs/extensions/reference/runtime/#type-OnInstalledReason */
|
6961
6969
|
export enum OnInstalledReason {
|
6962
6970
|
INSTALL = "install",
|
@@ -6970,6 +6978,22 @@ declare namespace chrome.runtime {
|
|
6970
6978
|
message?: string | undefined;
|
6971
6979
|
}
|
6972
6980
|
|
6981
|
+
/**
|
6982
|
+
* A filter to match against certain extension contexts. Matching contexts must match all specified filters; any filter that is not specified matches all available contexts. Thus, a filter of `{}` will match all available contexts.
|
6983
|
+
* @since Chrome 114.
|
6984
|
+
*/
|
6985
|
+
export interface ContextFilter {
|
6986
|
+
contextIds?: string[] | undefined;
|
6987
|
+
contextTypes?: ContextType[] | undefined;
|
6988
|
+
documentIds?: string[] | undefined;
|
6989
|
+
documentOrigins?: string[] | undefined;
|
6990
|
+
documentUrls?: string[] | undefined;
|
6991
|
+
frameIds?: number[] | undefined;
|
6992
|
+
incognito?: boolean | undefined;
|
6993
|
+
tabIds?: number[] | undefined;
|
6994
|
+
windowIds?: number[] | undefined;
|
6995
|
+
}
|
6996
|
+
|
6973
6997
|
export interface ConnectInfo {
|
6974
6998
|
name?: string | undefined;
|
6975
6999
|
includeTlsChannelId?: boolean | undefined;
|
@@ -6993,6 +7017,40 @@ declare namespace chrome.runtime {
|
|
6993
7017
|
id?: string | undefined;
|
6994
7018
|
}
|
6995
7019
|
|
7020
|
+
/**
|
7021
|
+
* A context hosting extension content.
|
7022
|
+
* @since Chrome 114.
|
7023
|
+
*/
|
7024
|
+
export interface ExtensionContext {
|
7025
|
+
/** A unique identifier for this context */
|
7026
|
+
contextId: string;
|
7027
|
+
/** The type of context this corresponds to. */
|
7028
|
+
contextType: ContextType;
|
7029
|
+
/**
|
7030
|
+
* Optional.
|
7031
|
+
* A UUID for the document associated with this context, or undefined if this context is hosted not in a document.
|
7032
|
+
*/
|
7033
|
+
documentId?: string | undefined;
|
7034
|
+
/**
|
7035
|
+
* Optional.
|
7036
|
+
* The origin of the document associated with this context, or undefined if the context is not hosted in a document.
|
7037
|
+
*/
|
7038
|
+
documentOrigin?: string | undefined;
|
7039
|
+
/**
|
7040
|
+
* Optional.
|
7041
|
+
* The URL of the document associated with this context, or undefined if the context is not hosted in a document.
|
7042
|
+
*/
|
7043
|
+
documentUrl?: string | undefined;
|
7044
|
+
/** The ID of the frame for this context, or -1 if this context is not hosted in a frame. */
|
7045
|
+
frameId: number;
|
7046
|
+
/** Whether the context is associated with an incognito profile. */
|
7047
|
+
incognito: boolean;
|
7048
|
+
/** The ID of the tab for this context, or -1 if this context is not hosted in a tab. */
|
7049
|
+
tabId: number;
|
7050
|
+
/** The ID of the window for this context, or -1 if this context is not hosted in a window. */
|
7051
|
+
windowId: number;
|
7052
|
+
}
|
7053
|
+
|
6996
7054
|
export interface MessageOptions {
|
6997
7055
|
/** Whether the TLS channel ID will be passed into onMessageExternal for processes that are listening for the connection event. */
|
6998
7056
|
includeTlsChannelId?: boolean | undefined;
|
@@ -7492,6 +7550,21 @@ declare namespace chrome.runtime {
|
|
7492
7550
|
export function connectNative(application: string): Port;
|
7493
7551
|
/** Retrieves the JavaScript 'window' object for the background page running inside the current extension/app. If the background page is an event page, the system will ensure it is loaded before calling the callback. If there is no background page, an error is set. */
|
7494
7552
|
export function getBackgroundPage(callback: (backgroundPage?: Window) => void): void;
|
7553
|
+
/**
|
7554
|
+
* Fetches information about active contexts associated with this extension
|
7555
|
+
* @since Chrome 116 MV3.
|
7556
|
+
* @return Provides the matching context, if any via callback or returned as a `Promise` (MV3 only).
|
7557
|
+
* @param filter A filter to find matching contexts. A context matches if it matches all specified fields in the filter. Any unspecified field in the filter matches all contexts.
|
7558
|
+
*/
|
7559
|
+
export function getContexts(filter: ContextFilter): Promise<ExtensionContext[]>;
|
7560
|
+
/**
|
7561
|
+
* Fetches information about active contexts associated with this extension
|
7562
|
+
* @since Chrome 116 MV3.
|
7563
|
+
* @return Provides the matching context, if any via callback or returned as a `Promise` (MV3 only).
|
7564
|
+
* @param filter A filter to find matching contexts. A context matches if it matches all specified fields in the filter. Any unspecified field in the filter matches all contexts.
|
7565
|
+
* @param callback Called with results
|
7566
|
+
*/
|
7567
|
+
export function getContexts(filter: ContextFilter, callback: (contexts: ExtensionContext[]) => void): void;
|
7495
7568
|
/**
|
7496
7569
|
* Returns details about the app or extension from the manifest. The object returned is a serialization of the full manifest file.
|
7497
7570
|
* @return The manifest details.
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.257",
|
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": "
|
96
|
+
"typesPublisherContentHash": "2d0372ff5868e907352b6208d2fc87a9d7c9faf94059a96c91de87d6c8b09c8d",
|
97
97
|
"typeScriptVersion": "4.6"
|
98
98
|
}
|