@types/chrome 0.0.229 → 0.0.231
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 +83 -4
- chrome/package.json +2 -2
chrome/README.md
CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Chrome extension development (http://
|
|
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: Wed, 12 Apr 2023 06:33: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
|
* Global values: `chrome`
|
14
14
|
|
chrome/index.d.ts
CHANGED
@@ -98,7 +98,10 @@ declare namespace chrome.accessibilityFeatures {
|
|
98
98
|
* Manifest: "action": {...}
|
99
99
|
*/
|
100
100
|
declare namespace chrome.action {
|
101
|
-
|
101
|
+
/** @deprecated Use BadgeColorDetails instead. */
|
102
|
+
export interface BadgeBackgroundColorDetails extends BadgeColorDetails {}
|
103
|
+
|
104
|
+
export interface BadgeColorDetails {
|
102
105
|
/** An array of four integers in the range [0,255] that make up the RGBA color of the badge. For example, opaque red is [255, 0, 0, 255]. Can also be a string with a CSS value, with opaque red being #FF0000 or #F00. */
|
103
106
|
color: string | ColorArray;
|
104
107
|
/** Optional. Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
|
@@ -217,6 +220,19 @@ declare namespace chrome.action {
|
|
217
220
|
*/
|
218
221
|
export function getBadgeText(details: TabDetails): Promise<string>;
|
219
222
|
|
223
|
+
/**
|
224
|
+
* Since Chrome 110.
|
225
|
+
* Gets the text color of the action.
|
226
|
+
*/
|
227
|
+
export function getBadgeTextColor(details: TabDetails, callback: (result: ColorArray) => void): void;
|
228
|
+
|
229
|
+
/**
|
230
|
+
* Since Chrome 110.
|
231
|
+
* Gets the text color of the action.
|
232
|
+
* @return The `getBadgeTextColor` method provides its result via callback or returned as a `Promise` (MV3 only).
|
233
|
+
*/
|
234
|
+
export function getBadgeTextColor(details: TabDetails): Promise<ColorArray>;
|
235
|
+
|
220
236
|
/**
|
221
237
|
* Since Chrome 88.
|
222
238
|
* Gets the html document set as the popup for this action.
|
@@ -256,6 +272,19 @@ declare namespace chrome.action {
|
|
256
272
|
*/
|
257
273
|
export function getUserSettings(): Promise<UserSettings>;
|
258
274
|
|
275
|
+
/**
|
276
|
+
* Since Chrome 110.
|
277
|
+
* Indicates whether the extension action is enabled for a tab (or globally if no tabId is provided). Actions enabled using only declarativeContent always return false.
|
278
|
+
*/
|
279
|
+
export function isEnabled(tabId: number | undefined, callback: (isEnabled: boolean) => void): void;
|
280
|
+
|
281
|
+
/**
|
282
|
+
* Since Chrome 110.
|
283
|
+
* Indicates whether the extension action is enabled for a tab (or globally if no tabId is provided). Actions enabled using only declarativeContent always return false.
|
284
|
+
* @return True if the extension action is enabled.
|
285
|
+
*/
|
286
|
+
export function isEnabled(tabId?: number): Promise<boolean>;
|
287
|
+
|
259
288
|
/**
|
260
289
|
* Since Chrome 99+.
|
261
290
|
* Opens the extension's popup.
|
@@ -278,13 +307,13 @@ declare namespace chrome.action {
|
|
278
307
|
* Sets the background color for the badge.
|
279
308
|
* @return The `setBadgeBackgroundColor` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
280
309
|
*/
|
281
|
-
export function setBadgeBackgroundColor(details:
|
310
|
+
export function setBadgeBackgroundColor(details: BadgeColorDetails): Promise<void>;
|
282
311
|
|
283
312
|
/**
|
284
313
|
* Since Chrome 88.
|
285
314
|
* Sets the background color for the badge.
|
286
315
|
*/
|
287
|
-
export function setBadgeBackgroundColor(details:
|
316
|
+
export function setBadgeBackgroundColor(details: BadgeColorDetails, callback: () => void): void;
|
288
317
|
|
289
318
|
/**
|
290
319
|
* Since Chrome 88.
|
@@ -299,6 +328,19 @@ declare namespace chrome.action {
|
|
299
328
|
*/
|
300
329
|
export function setBadgeText(details: BadgeTextDetails, callback: () => void): void;
|
301
330
|
|
331
|
+
/**
|
332
|
+
* Since Chrome 110.
|
333
|
+
* Sets the text color for the badge.
|
334
|
+
* @return The `setBadgeTextColor` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
335
|
+
*/
|
336
|
+
export function setBadgeTextColor(details: BadgeColorDetails): Promise<void>;
|
337
|
+
|
338
|
+
/**
|
339
|
+
* Since Chrome 100.
|
340
|
+
* Sets the text color for the badge.
|
341
|
+
*/
|
342
|
+
export function setBadgeTextColor(details: BadgeColorDetails, callback: () => void): void;
|
343
|
+
|
302
344
|
/**
|
303
345
|
* Since Chrome 88.
|
304
346
|
* Sets the icon for the action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element,
|
@@ -7543,6 +7585,7 @@ declare namespace chrome.scripting {
|
|
7543
7585
|
interface RegisteredContentScript {
|
7544
7586
|
id: string;
|
7545
7587
|
allFrames?: boolean;
|
7588
|
+
matchOriginAsFallback?: boolean;
|
7546
7589
|
css?: string[];
|
7547
7590
|
excludeMatches?: string[];
|
7548
7591
|
js?: string[];
|
@@ -7660,6 +7703,19 @@ declare namespace chrome.scripting {
|
|
7660
7703
|
*/
|
7661
7704
|
export function getRegisteredContentScripts(callback: (scripts: RegisteredContentScript[]) => void): void;
|
7662
7705
|
export function getRegisteredContentScripts(filter: ContentScriptFilter, callback: (scripts: RegisteredContentScript[]) => void): void;
|
7706
|
+
|
7707
|
+
/**
|
7708
|
+
* Updates one or more content scripts.
|
7709
|
+
* @param scripts
|
7710
|
+
*/
|
7711
|
+
export function updateContentScripts(scripts: RegisteredContentScript[]): Promise<void>;
|
7712
|
+
|
7713
|
+
/**
|
7714
|
+
* Updates one or more content scripts.
|
7715
|
+
* @param scripts
|
7716
|
+
* @param callback
|
7717
|
+
*/
|
7718
|
+
export function updateContentScripts(scripts: RegisteredContentScript[], callback: () => void): void;
|
7663
7719
|
}
|
7664
7720
|
|
7665
7721
|
////////////////////
|
@@ -7732,6 +7788,11 @@ declare namespace chrome.sessions {
|
|
7732
7788
|
/** The maximum number of sessions.Session that will be included in a requested list. */
|
7733
7789
|
export var MAX_SESSION_RESULTS: number;
|
7734
7790
|
|
7791
|
+
/**
|
7792
|
+
* Gets the list of recently closed tabs and/or windows.
|
7793
|
+
* @return The `getRecentlyClosed` method provides its result via callback or returned as a `Promise` (MV3 only).
|
7794
|
+
*/
|
7795
|
+
export function getRecentlyClosed(filter?: Filter): Promise<Session[]>;
|
7735
7796
|
/**
|
7736
7797
|
* Gets the list of recently closed tabs and/or windows.
|
7737
7798
|
* @param callback
|
@@ -7744,6 +7805,11 @@ declare namespace chrome.sessions {
|
|
7744
7805
|
* Parameter sessions: The list of closed entries in reverse order that they were closed (the most recently closed tab or window will be at index 0). The entries may contain either tabs or windows.
|
7745
7806
|
*/
|
7746
7807
|
export function getRecentlyClosed(callback: (sessions: Session[]) => void): void;
|
7808
|
+
/**
|
7809
|
+
* Retrieves all devices with synced sessions.
|
7810
|
+
* @return The `getDevices` method provides its result via callback or returned as a `Promise` (MV3 only).
|
7811
|
+
*/
|
7812
|
+
export function getDevices(filter?: Filter): Promise<Device[]>;
|
7747
7813
|
/**
|
7748
7814
|
* Retrieves all devices with synced sessions.
|
7749
7815
|
* @param callback
|
@@ -7756,6 +7822,13 @@ declare namespace chrome.sessions {
|
|
7756
7822
|
* Parameter devices: The list of sessions.Device objects for each synced session, sorted in order from device with most recently modified session to device with least recently modified session. tabs.Tab objects are sorted by recency in the windows.Window of the sessions.Session objects.
|
7757
7823
|
*/
|
7758
7824
|
export function getDevices(callback: (devices: Device[]) => void): void;
|
7825
|
+
/**
|
7826
|
+
* Reopens a windows.Window or tabs.Tab.
|
7827
|
+
* @param sessionId Optional.
|
7828
|
+
* The windows.Window.sessionId, or tabs.Tab.sessionId to restore. If this parameter is not specified, the most recently closed session is restored.
|
7829
|
+
* @return The `restore` method provides its result via callback or returned as a `Promise` (MV3 only).
|
7830
|
+
*/
|
7831
|
+
export function restore(sessionId?: string): Promise<Session>;
|
7759
7832
|
/**
|
7760
7833
|
* Reopens a windows.Window or tabs.Tab, with an optional callback to run when the entry has been restored.
|
7761
7834
|
* @param sessionId Optional.
|
@@ -7763,7 +7836,13 @@ declare namespace chrome.sessions {
|
|
7763
7836
|
* @param callback Optional.
|
7764
7837
|
* Parameter restoredSession: A sessions.Session containing the restored windows.Window or tabs.Tab object.
|
7765
7838
|
*/
|
7766
|
-
export function restore(sessionId
|
7839
|
+
export function restore(sessionId: string, callback: (restoredSession: Session) => void): void;
|
7840
|
+
/**
|
7841
|
+
* Reopens a windows.Window or tabs.Tab, with an optional callback to run when the entry has been restored.
|
7842
|
+
* @param callback Optional.
|
7843
|
+
* Parameter restoredSession: A sessions.Session containing the restored windows.Window or tabs.Tab object.
|
7844
|
+
*/
|
7845
|
+
export function restore(callback: (restoredSession: Session) => void): void;
|
7767
7846
|
|
7768
7847
|
/** Fired when recently closed tabs and/or windows are changed. This event does not monitor synced sessions changes. */
|
7769
7848
|
export var onChanged: SessionChangedEvent;
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.231",
|
4
4
|
"description": "TypeScript definitions for Chrome extension development",
|
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": "51f1ead782c71680b046539fa3da4e7bbe9bcd7f135a6bcefe996ad3c207cc74",
|
97
97
|
"typeScriptVersion": "4.3"
|
98
98
|
}
|