@types/chrome 0.0.255 → 0.0.257
Sign up to get free protection for your applications and to get access to all the features.
- chrome/README.md +1 -1
- chrome/index.d.ts +78 -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
@@ -6242,6 +6242,11 @@ declare namespace chrome.pageCapture {
|
|
6242
6242
|
* Parameter mhtmlData: The MHTML data as a Blob.
|
6243
6243
|
*/
|
6244
6244
|
export function saveAsMHTML(details: SaveDetails, callback: (mhtmlData?: Blob) => void): void;
|
6245
|
+
/**
|
6246
|
+
* Saves the content of the tab with given id as MHTML.
|
6247
|
+
* @since Chrome 116 MV3
|
6248
|
+
*/
|
6249
|
+
export function saveAsMHTML(details: SaveDetails): Promise<Blob | undefined>;
|
6245
6250
|
}
|
6246
6251
|
|
6247
6252
|
////////////////////
|
@@ -6952,6 +6957,14 @@ declare namespace chrome.runtime {
|
|
6952
6957
|
export type PlatformArch = "arm" | "arm64" | "x86-32" | "x86-64" | "mips" | "mips64";
|
6953
6958
|
/** https://developer.chrome.com/docs/extensions/reference/runtime/#type-PlatformNaclArch */
|
6954
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
|
+
}
|
6955
6968
|
/** https://developer.chrome.com/docs/extensions/reference/runtime/#type-OnInstalledReason */
|
6956
6969
|
export enum OnInstalledReason {
|
6957
6970
|
INSTALL = "install",
|
@@ -6965,6 +6978,22 @@ declare namespace chrome.runtime {
|
|
6965
6978
|
message?: string | undefined;
|
6966
6979
|
}
|
6967
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
|
+
|
6968
6997
|
export interface ConnectInfo {
|
6969
6998
|
name?: string | undefined;
|
6970
6999
|
includeTlsChannelId?: boolean | undefined;
|
@@ -6988,6 +7017,40 @@ declare namespace chrome.runtime {
|
|
6988
7017
|
id?: string | undefined;
|
6989
7018
|
}
|
6990
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
|
+
|
6991
7054
|
export interface MessageOptions {
|
6992
7055
|
/** Whether the TLS channel ID will be passed into onMessageExternal for processes that are listening for the connection event. */
|
6993
7056
|
includeTlsChannelId?: boolean | undefined;
|
@@ -7487,6 +7550,21 @@ declare namespace chrome.runtime {
|
|
7487
7550
|
export function connectNative(application: string): Port;
|
7488
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. */
|
7489
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;
|
7490
7568
|
/**
|
7491
7569
|
* Returns details about the app or extension from the manifest. The object returned is a serialization of the full manifest file.
|
7492
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
|
}
|