@types/chrome 0.0.230 → 0.0.231
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 +45 -3
- 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: Wed, 12 Apr 2023 06:
|
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,
|
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
|
}
|