@types/chrome 0.0.244 → 0.0.246
Sign up to get free protection for your applications and to get access to all the features.
- chrome/LICENSE +0 -0
- chrome/README.md +1 -1
- chrome/chrome-cast/index.d.ts +83 -83
- chrome/har-format/index.d.ts +1 -1
- chrome/index.d.ts +808 -618
- chrome/package.json +3 -3
chrome/index.d.ts
CHANGED
@@ -131,7 +131,7 @@ declare namespace chrome.action {
|
|
131
131
|
popup: string;
|
132
132
|
}
|
133
133
|
|
134
|
-
export interface BrowserClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {
|
134
|
+
export interface BrowserClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {}
|
135
135
|
|
136
136
|
export interface TabIconDetails {
|
137
137
|
/** Optional. Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals scale, then image with size scale * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}' */
|
@@ -347,7 +347,7 @@ declare namespace chrome.action {
|
|
347
347
|
* or as dictionary of either one of those. Either the path or the imageData property must be specified.
|
348
348
|
* @return The `setIcon` method provides its result via callback or returned as a `Promise` (MV3 only). Since Chrome 96.
|
349
349
|
*/
|
350
|
-
export function setIcon(details: TabIconDetails): Promise<void
|
350
|
+
export function setIcon(details: TabIconDetails): Promise<void>;
|
351
351
|
export function setIcon(details: TabIconDetails, callback: () => void): void;
|
352
352
|
|
353
353
|
/**
|
@@ -407,7 +407,7 @@ declare namespace chrome.alarms {
|
|
407
407
|
name: string;
|
408
408
|
}
|
409
409
|
|
410
|
-
export interface AlarmEvent extends chrome.events.Event<(alarm: Alarm) => void> {
|
410
|
+
export interface AlarmEvent extends chrome.events.Event<(alarm: Alarm) => void> {}
|
411
411
|
|
412
412
|
/**
|
413
413
|
* Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
|
@@ -570,7 +570,7 @@ declare namespace chrome.bookmarks {
|
|
570
570
|
* Since Chrome 37.
|
571
571
|
* Indicates the reason why this node is unmodifiable. The managed value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default).
|
572
572
|
*/
|
573
|
-
unmodifiable?:
|
573
|
+
unmodifiable?: "managed" | undefined;
|
574
574
|
}
|
575
575
|
|
576
576
|
export interface BookmarkRemoveInfo {
|
@@ -596,22 +596,26 @@ declare namespace chrome.bookmarks {
|
|
596
596
|
}
|
597
597
|
|
598
598
|
export interface BookmarkRemovedEvent
|
599
|
-
extends chrome.events.Event<(id: string, removeInfo: BookmarkRemoveInfo) => void>
|
599
|
+
extends chrome.events.Event<(id: string, removeInfo: BookmarkRemoveInfo) => void>
|
600
|
+
{}
|
600
601
|
|
601
|
-
export interface BookmarkImportEndedEvent extends chrome.events.Event<() => void> {
|
602
|
+
export interface BookmarkImportEndedEvent extends chrome.events.Event<() => void> {}
|
602
603
|
|
603
|
-
export interface BookmarkMovedEvent extends chrome.events.Event<(id: string, moveInfo: BookmarkMoveInfo) => void> {
|
604
|
+
export interface BookmarkMovedEvent extends chrome.events.Event<(id: string, moveInfo: BookmarkMoveInfo) => void> {}
|
604
605
|
|
605
|
-
export interface BookmarkImportBeganEvent extends chrome.events.Event<() => void> {
|
606
|
+
export interface BookmarkImportBeganEvent extends chrome.events.Event<() => void> {}
|
606
607
|
|
607
608
|
export interface BookmarkChangedEvent
|
608
|
-
extends chrome.events.Event<(id: string, changeInfo: BookmarkChangeInfo) => void>
|
609
|
+
extends chrome.events.Event<(id: string, changeInfo: BookmarkChangeInfo) => void>
|
610
|
+
{}
|
609
611
|
|
610
612
|
export interface BookmarkCreatedEvent
|
611
|
-
extends chrome.events.Event<(id: string, bookmark: BookmarkTreeNode) => void>
|
613
|
+
extends chrome.events.Event<(id: string, bookmark: BookmarkTreeNode) => void>
|
614
|
+
{}
|
612
615
|
|
613
616
|
export interface BookmarkChildrenReordered
|
614
|
-
extends chrome.events.Event<(id: string, reorderInfo: BookmarkReorderInfo) => void>
|
617
|
+
extends chrome.events.Event<(id: string, reorderInfo: BookmarkReorderInfo) => void>
|
618
|
+
{}
|
615
619
|
|
616
620
|
export interface BookmarkSearchQuery {
|
617
621
|
query?: string | undefined;
|
@@ -857,7 +861,7 @@ declare namespace chrome.browserAction {
|
|
857
861
|
popup: string;
|
858
862
|
}
|
859
863
|
|
860
|
-
export interface BrowserClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {
|
864
|
+
export interface BrowserClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {}
|
861
865
|
|
862
866
|
/**
|
863
867
|
* Since Chrome 22.
|
@@ -1200,16 +1204,16 @@ declare namespace chrome.browsingData {
|
|
1200
1204
|
/** Clears websites' cache storage data.
|
1201
1205
|
* @return The `removeCacheStorage` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
1202
1206
|
*/
|
1203
|
-
export function removeCacheStorage(options: RemovalOptions): Promise<void
|
1207
|
+
export function removeCacheStorage(options: RemovalOptions): Promise<void>;
|
1204
1208
|
/** Clears websites' cache storage data.
|
1205
1209
|
* @param callback Called when websites' appcache data has been cleared.
|
1206
1210
|
*/
|
1207
|
-
export function removeCacheStorage(options: RemovalOptions, callback: () => void): void
|
1211
|
+
export function removeCacheStorage(options: RemovalOptions, callback: () => void): void;
|
1208
1212
|
/**
|
1209
1213
|
* Clears the browser's list of downloaded files (not the downloaded files themselves).
|
1210
1214
|
* @return The `removeDownloads` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
1211
1215
|
*/
|
1212
|
-
export function removeDownloads(options: RemovalOptions): Promise<void
|
1216
|
+
export function removeDownloads(options: RemovalOptions): Promise<void>;
|
1213
1217
|
/**
|
1214
1218
|
* Clears the browser's list of downloaded files (not the downloaded files themselves).
|
1215
1219
|
* @param callback Called when the browser's list of downloaded files has been cleared.
|
@@ -1275,7 +1279,7 @@ declare namespace chrome.commands {
|
|
1275
1279
|
shortcut?: string | undefined;
|
1276
1280
|
}
|
1277
1281
|
|
1278
|
-
export interface CommandEvent extends chrome.events.Event<(command: string, tab: chrome.tabs.Tab) => void> {
|
1282
|
+
export interface CommandEvent extends chrome.events.Event<(command: string, tab: chrome.tabs.Tab) => void> {}
|
1279
1283
|
|
1280
1284
|
/**
|
1281
1285
|
* Returns all the registered extension commands for this extension and their shortcut (if active).
|
@@ -1301,7 +1305,7 @@ declare namespace chrome.commands {
|
|
1301
1305
|
* Permissions: "contentSettings"
|
1302
1306
|
*/
|
1303
1307
|
declare namespace chrome.contentSettings {
|
1304
|
-
type ScopeEnum =
|
1308
|
+
type ScopeEnum = "regular" | "incognito_session_only";
|
1305
1309
|
|
1306
1310
|
export interface ClearDetails {
|
1307
1311
|
/**
|
@@ -1314,7 +1318,7 @@ declare namespace chrome.contentSettings {
|
|
1314
1318
|
scope?: ScopeEnum | undefined;
|
1315
1319
|
}
|
1316
1320
|
|
1317
|
-
type DefaultContentSettingDetails =
|
1321
|
+
type DefaultContentSettingDetails = "allow" | "ask" | "block" | "detect_important_content" | "session_only";
|
1318
1322
|
|
1319
1323
|
export interface SetDetails {
|
1320
1324
|
/** Optional. The resource identifier for the content type. */
|
@@ -1330,55 +1334,55 @@ declare namespace chrome.contentSettings {
|
|
1330
1334
|
}
|
1331
1335
|
|
1332
1336
|
export interface CookieSetDetails extends SetDetails {
|
1333
|
-
setting:
|
1337
|
+
setting: "allow" | "block" | "session_only";
|
1334
1338
|
}
|
1335
1339
|
|
1336
1340
|
export interface ImagesSetDetails extends SetDetails {
|
1337
|
-
setting:
|
1341
|
+
setting: "allow" | "block";
|
1338
1342
|
}
|
1339
1343
|
|
1340
1344
|
export interface JavascriptSetDetails extends SetDetails {
|
1341
|
-
setting:
|
1345
|
+
setting: "allow" | "block";
|
1342
1346
|
}
|
1343
1347
|
|
1344
1348
|
export interface LocationSetDetails extends SetDetails {
|
1345
|
-
setting:
|
1349
|
+
setting: "allow" | "block" | "ask";
|
1346
1350
|
}
|
1347
1351
|
|
1348
1352
|
export interface PluginsSetDetails extends SetDetails {
|
1349
|
-
setting:
|
1353
|
+
setting: "allow" | "block" | "detect_important_content";
|
1350
1354
|
}
|
1351
1355
|
|
1352
1356
|
export interface PopupsSetDetails extends SetDetails {
|
1353
|
-
setting:
|
1357
|
+
setting: "allow" | "block";
|
1354
1358
|
}
|
1355
1359
|
|
1356
1360
|
export interface NotificationsSetDetails extends SetDetails {
|
1357
|
-
setting:
|
1361
|
+
setting: "allow" | "block" | "ask";
|
1358
1362
|
}
|
1359
1363
|
|
1360
1364
|
export interface FullscreenSetDetails extends SetDetails {
|
1361
|
-
setting:
|
1365
|
+
setting: "allow";
|
1362
1366
|
}
|
1363
1367
|
|
1364
1368
|
export interface MouselockSetDetails extends SetDetails {
|
1365
|
-
setting:
|
1369
|
+
setting: "allow";
|
1366
1370
|
}
|
1367
1371
|
|
1368
1372
|
export interface MicrophoneSetDetails extends SetDetails {
|
1369
|
-
setting:
|
1373
|
+
setting: "allow" | "block" | "ask";
|
1370
1374
|
}
|
1371
1375
|
|
1372
1376
|
export interface CameraSetDetails extends SetDetails {
|
1373
|
-
setting:
|
1377
|
+
setting: "allow" | "block" | "ask";
|
1374
1378
|
}
|
1375
1379
|
|
1376
1380
|
export interface PpapiBrokerSetDetails extends SetDetails {
|
1377
|
-
setting:
|
1381
|
+
setting: "allow" | "block" | "ask";
|
1378
1382
|
}
|
1379
1383
|
|
1380
1384
|
export interface MultipleAutomaticDownloadsSetDetails extends SetDetails {
|
1381
|
-
setting:
|
1385
|
+
setting: "allow" | "block" | "ask";
|
1382
1386
|
}
|
1383
1387
|
|
1384
1388
|
export interface GetDetails {
|
@@ -1411,8 +1415,8 @@ declare namespace chrome.contentSettings {
|
|
1411
1415
|
/**
|
1412
1416
|
* A list of resource identifiers for this content type, or undefined if this content type does not use resource identifiers.
|
1413
1417
|
*/
|
1414
|
-
resourceIdentifiers?: ResourceIdentifier[]
|
1415
|
-
) => void
|
1418
|
+
resourceIdentifiers?: ResourceIdentifier[],
|
1419
|
+
) => void,
|
1416
1420
|
): void;
|
1417
1421
|
/**
|
1418
1422
|
* Gets the current content setting for a given pair of URLs.
|
@@ -1667,7 +1671,7 @@ declare namespace chrome.contextMenus {
|
|
1667
1671
|
* Since Chrome 35.
|
1668
1672
|
* One of 'image', 'video', or 'audio' if the context menu was activated on one of these types of elements.
|
1669
1673
|
*/
|
1670
|
-
mediaType?:
|
1674
|
+
mediaType?: "image" | "video" | "audio" | undefined;
|
1671
1675
|
/**
|
1672
1676
|
* Optional.
|
1673
1677
|
* Since Chrome 35.
|
@@ -1699,7 +1703,20 @@ declare namespace chrome.contextMenus {
|
|
1699
1703
|
srcUrl?: string | undefined;
|
1700
1704
|
}
|
1701
1705
|
|
1702
|
-
type ContextType =
|
1706
|
+
type ContextType =
|
1707
|
+
| "all"
|
1708
|
+
| "page"
|
1709
|
+
| "frame"
|
1710
|
+
| "selection"
|
1711
|
+
| "link"
|
1712
|
+
| "editable"
|
1713
|
+
| "image"
|
1714
|
+
| "video"
|
1715
|
+
| "audio"
|
1716
|
+
| "launcher"
|
1717
|
+
| "browser_action"
|
1718
|
+
| "page_action"
|
1719
|
+
| "action";
|
1703
1720
|
|
1704
1721
|
type ContextItemType = "normal" | "checkbox" | "radio" | "separator";
|
1705
1722
|
|
@@ -1765,7 +1782,7 @@ declare namespace chrome.contextMenus {
|
|
1765
1782
|
visible?: boolean | undefined;
|
1766
1783
|
}
|
1767
1784
|
|
1768
|
-
export interface MenuClickedEvent extends chrome.events.Event<(info: OnClickData, tab?: chrome.tabs.Tab) => void> {
|
1785
|
+
export interface MenuClickedEvent extends chrome.events.Event<(info: OnClickData, tab?: chrome.tabs.Tab) => void> {}
|
1769
1786
|
|
1770
1787
|
/**
|
1771
1788
|
* Since Chrome 38.
|
@@ -1815,7 +1832,7 @@ declare namespace chrome.contextMenus {
|
|
1815
1832
|
*/
|
1816
1833
|
declare namespace chrome.cookies {
|
1817
1834
|
/** A cookie's 'SameSite' state (https://tools.ietf.org/html/draft-west-first-party-cookies). 'no_restriction' corresponds to a cookie set with 'SameSite=None', 'lax' to 'SameSite=Lax', and 'strict' to 'SameSite=Strict'. 'unspecified' corresponds to a cookie set without the SameSite attribute. **/
|
1818
|
-
export type SameSiteStatus =
|
1835
|
+
export type SameSiteStatus = "unspecified" | "no_restriction" | "lax" | "strict";
|
1819
1836
|
|
1820
1837
|
/** Represents information about an HTTP cookie. */
|
1821
1838
|
export interface Cookie {
|
@@ -1915,7 +1932,7 @@ declare namespace chrome.cookies {
|
|
1915
1932
|
cause: string;
|
1916
1933
|
}
|
1917
1934
|
|
1918
|
-
export interface CookieChangedEvent extends chrome.events.Event<(changeInfo: CookieChangeInfo) => void> {
|
1935
|
+
export interface CookieChangedEvent extends chrome.events.Event<(changeInfo: CookieChangeInfo) => void> {}
|
1919
1936
|
|
1920
1937
|
/**
|
1921
1938
|
* Lists all existing cookie stores.
|
@@ -2039,10 +2056,12 @@ declare namespace chrome {
|
|
2039
2056
|
}
|
2040
2057
|
|
2041
2058
|
export interface DebuggerDetachedEvent
|
2042
|
-
extends chrome.events.Event<(source: Debuggee, reason: string) => void>
|
2059
|
+
extends chrome.events.Event<(source: Debuggee, reason: string) => void>
|
2060
|
+
{}
|
2043
2061
|
|
2044
2062
|
export interface DebuggerEventEvent
|
2045
|
-
extends chrome.events.Event<(source: Debuggee, method: string, params?: Object) => void>
|
2063
|
+
extends chrome.events.Event<(source: Debuggee, method: string, params?: Object) => void>
|
2064
|
+
{}
|
2046
2065
|
|
2047
2066
|
/**
|
2048
2067
|
* Attaches debugger to the given target.
|
@@ -2192,13 +2211,13 @@ declare namespace chrome.declarativeContent {
|
|
2192
2211
|
* Declarative event action that enables the extension's action while the corresponding conditions are met.
|
2193
2212
|
* Manifest v3.
|
2194
2213
|
*/
|
2195
|
-
export class ShowAction {
|
2214
|
+
export class ShowAction {}
|
2196
2215
|
|
2197
2216
|
/**
|
2198
2217
|
* Declarative event action that shows the extension's page action while the corresponding conditions are met.
|
2199
2218
|
* Manifest v2.
|
2200
2219
|
*/
|
2201
|
-
export class ShowPageAction {
|
2220
|
+
export class ShowPageAction {}
|
2202
2221
|
|
2203
2222
|
/** Declarative event action that changes the icon of the page action while the corresponding conditions are met. */
|
2204
2223
|
export class SetIcon {
|
@@ -2206,7 +2225,7 @@ declare namespace chrome.declarativeContent {
|
|
2206
2225
|
}
|
2207
2226
|
|
2208
2227
|
/** Provides the Declarative Event API consisting of addRules, removeRules, and getRules. */
|
2209
|
-
export interface PageChangedEvent extends chrome.events.Event<() => void> {
|
2228
|
+
export interface PageChangedEvent extends chrome.events.Event<() => void> {}
|
2210
2229
|
|
2211
2230
|
export var onPageChanged: PageChangedEvent;
|
2212
2231
|
}
|
@@ -2253,7 +2272,7 @@ declare namespace chrome.declarativeWebRequest {
|
|
2253
2272
|
lowerPriorityThan: number;
|
2254
2273
|
}
|
2255
2274
|
|
2256
|
-
export interface RedirectToEmptyDocument {
|
2275
|
+
export interface RedirectToEmptyDocument {}
|
2257
2276
|
|
2258
2277
|
export interface RedirectRequest {
|
2259
2278
|
redirectUrl: string;
|
@@ -2279,7 +2298,7 @@ declare namespace chrome.declarativeWebRequest {
|
|
2279
2298
|
modification: ResponseCookie;
|
2280
2299
|
}
|
2281
2300
|
|
2282
|
-
export interface CancelRequest {
|
2301
|
+
export interface CancelRequest {}
|
2283
2302
|
|
2284
2303
|
export interface RemoveRequestHeader {
|
2285
2304
|
name: string;
|
@@ -2305,7 +2324,7 @@ declare namespace chrome.declarativeWebRequest {
|
|
2305
2324
|
from: string;
|
2306
2325
|
}
|
2307
2326
|
|
2308
|
-
export interface RedirectToTransparentImage {
|
2327
|
+
export interface RedirectToTransparentImage {}
|
2309
2328
|
|
2310
2329
|
export interface AddRequestCookie {
|
2311
2330
|
cookie: RequestCookie;
|
@@ -2315,7 +2334,7 @@ declare namespace chrome.declarativeWebRequest {
|
|
2315
2334
|
filter: RequestCookie;
|
2316
2335
|
}
|
2317
2336
|
|
2318
|
-
export interface RequestedEvent extends chrome.events.Event<Function> {
|
2337
|
+
export interface RequestedEvent extends chrome.events.Event<Function> {}
|
2319
2338
|
|
2320
2339
|
export var onRequest: RequestedEvent;
|
2321
2340
|
}
|
@@ -2339,7 +2358,10 @@ declare namespace chrome.desktopCapture {
|
|
2339
2358
|
* @param sources Set of sources that should be shown to the user.
|
2340
2359
|
* Parameter streamId: An opaque string that can be passed to getUserMedia() API to generate media stream that corresponds to the source selected by the user. If user didn't select any source (i.e. canceled the prompt) then the callback is called with an empty streamId. The created streamId can be used only once and expires after a few seconds when it is not used.
|
2341
2360
|
*/
|
2342
|
-
export function chooseDesktopMedia(
|
2361
|
+
export function chooseDesktopMedia(
|
2362
|
+
sources: string[],
|
2363
|
+
callback: (streamId: string, options: StreamOptions) => void,
|
2364
|
+
): number;
|
2343
2365
|
/**
|
2344
2366
|
* Shows desktop media picker UI with the specified set of sources.
|
2345
2367
|
* @param sources Set of sources that should be shown to the user.
|
@@ -2368,36 +2390,36 @@ declare namespace chrome.desktopCapture {
|
|
2368
2390
|
declare namespace chrome.devtools.inspectedWindow {
|
2369
2391
|
/** A resource within the inspected page, such as a document, a script, or an image. */
|
2370
2392
|
export interface Resource {
|
2371
|
-
|
2372
|
-
|
2373
|
-
|
2374
|
-
|
2375
|
-
|
2376
|
-
|
2377
|
-
|
2378
|
-
|
2379
|
-
|
2380
|
-
|
2381
|
-
|
2382
|
-
|
2383
|
-
|
2384
|
-
|
2385
|
-
|
2386
|
-
|
2387
|
-
|
2388
|
-
|
2389
|
-
|
2390
|
-
|
2391
|
-
|
2392
|
-
|
2393
|
-
|
2394
|
-
|
2395
|
-
|
2396
|
-
|
2397
|
-
|
2398
|
-
|
2399
|
-
|
2400
|
-
|
2393
|
+
/** The URL of the resource. */
|
2394
|
+
url: string;
|
2395
|
+
/**
|
2396
|
+
* Gets the content of the resource.
|
2397
|
+
* @param callback A function that receives resource content when the request completes.
|
2398
|
+
*/
|
2399
|
+
getContent(
|
2400
|
+
callback: (
|
2401
|
+
/** Content of the resource (potentially encoded) */
|
2402
|
+
content: string,
|
2403
|
+
/** Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported. */
|
2404
|
+
encoding: string,
|
2405
|
+
) => void,
|
2406
|
+
): void;
|
2407
|
+
/**
|
2408
|
+
* Sets the content of the resource.
|
2409
|
+
* @param content New content of the resource. Only resources with the text type are currently supported.
|
2410
|
+
* @param commit True if the user has finished editing the resource, and the new content of the resource should be persisted; false if this is a minor change sent in progress of the user editing the resource.
|
2411
|
+
* @param callback A function called upon request completion.
|
2412
|
+
*/
|
2413
|
+
setContent(
|
2414
|
+
content: string,
|
2415
|
+
commit: boolean,
|
2416
|
+
callback?: (
|
2417
|
+
/**
|
2418
|
+
* Set to undefined if the resource content was set successfully; describes error otherwise.
|
2419
|
+
*/
|
2420
|
+
error?: Object,
|
2421
|
+
) => void,
|
2422
|
+
): void;
|
2401
2423
|
}
|
2402
2424
|
|
2403
2425
|
export interface ReloadOptions {
|
@@ -2430,10 +2452,11 @@ declare namespace chrome.devtools.inspectedWindow {
|
|
2430
2452
|
value: string;
|
2431
2453
|
}
|
2432
2454
|
|
2433
|
-
export interface ResourceAddedEvent extends chrome.events.Event<(resource: Resource) => void> {
|
2455
|
+
export interface ResourceAddedEvent extends chrome.events.Event<(resource: Resource) => void> {}
|
2434
2456
|
|
2435
2457
|
export interface ResourceContentCommittedEvent
|
2436
|
-
extends chrome.events.Event<(resource: Resource, content: string) => void>
|
2458
|
+
extends chrome.events.Event<(resource: Resource, content: string) => void>
|
2459
|
+
{}
|
2437
2460
|
|
2438
2461
|
/** The ID of the tab being inspected. This ID may be used with chrome.tabs.* API. */
|
2439
2462
|
export var tabId: number;
|
@@ -2494,28 +2517,28 @@ declare namespace chrome.devtools.inspectedWindow {
|
|
2494
2517
|
*/
|
2495
2518
|
declare namespace chrome.devtools.network {
|
2496
2519
|
/** Represents a HAR entry for a specific finished request. */
|
2497
|
-
export interface HAREntry extends HARFormatEntry {
|
2520
|
+
export interface HAREntry extends HARFormatEntry {}
|
2498
2521
|
/** Represents a HAR log that contains all known network requests. */
|
2499
|
-
export interface HARLog extends HARFormatLog {
|
2522
|
+
export interface HARLog extends HARFormatLog {}
|
2500
2523
|
/** Represents a network request for a document resource (script, image and so on). See HAR Specification for reference. */
|
2501
2524
|
export interface Request extends chrome.devtools.network.HAREntry {
|
2502
|
-
|
2503
|
-
|
2504
|
-
|
2505
|
-
|
2506
|
-
|
2507
|
-
|
2508
|
-
|
2509
|
-
|
2510
|
-
|
2511
|
-
|
2512
|
-
|
2513
|
-
|
2525
|
+
/**
|
2526
|
+
* Returns content of the response body.
|
2527
|
+
* @param callback A function that receives the response body when the request completes.
|
2528
|
+
*/
|
2529
|
+
getContent(
|
2530
|
+
callback: (
|
2531
|
+
/** Content of the response body (potentially encoded) */
|
2532
|
+
content: string,
|
2533
|
+
/** Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported */
|
2534
|
+
encoding: string,
|
2535
|
+
) => void,
|
2536
|
+
): void;
|
2514
2537
|
}
|
2515
2538
|
|
2516
|
-
export interface RequestFinishedEvent extends chrome.events.Event<(request: Request) => void> {
|
2539
|
+
export interface RequestFinishedEvent extends chrome.events.Event<(request: Request) => void> {}
|
2517
2540
|
|
2518
|
-
export interface NavigatedEvent extends chrome.events.Event<(url: string) => void> {
|
2541
|
+
export interface NavigatedEvent extends chrome.events.Event<(url: string) => void> {}
|
2519
2542
|
|
2520
2543
|
/**
|
2521
2544
|
* Returns HAR log that contains all known network requests.
|
@@ -2538,11 +2561,11 @@ declare namespace chrome.devtools.network {
|
|
2538
2561
|
* Availability: Since Chrome 18.
|
2539
2562
|
*/
|
2540
2563
|
declare namespace chrome.devtools.panels {
|
2541
|
-
export interface PanelShownEvent extends chrome.events.Event<(window: Window) => void> {
|
2564
|
+
export interface PanelShownEvent extends chrome.events.Event<(window: Window) => void> {}
|
2542
2565
|
|
2543
|
-
export interface PanelHiddenEvent extends chrome.events.Event<() => void> {
|
2566
|
+
export interface PanelHiddenEvent extends chrome.events.Event<() => void> {}
|
2544
2567
|
|
2545
|
-
export interface PanelSearchEvent extends chrome.events.Event<(action: string, queryString?: string) => void> {
|
2568
|
+
export interface PanelSearchEvent extends chrome.events.Event<(action: string, queryString?: string) => void> {}
|
2546
2569
|
|
2547
2570
|
/** Represents a panel created by extension. */
|
2548
2571
|
export interface ExtensionPanel {
|
@@ -2561,7 +2584,7 @@ declare namespace chrome.devtools.panels {
|
|
2561
2584
|
onSearch: PanelSearchEvent;
|
2562
2585
|
}
|
2563
2586
|
|
2564
|
-
export interface ButtonClickedEvent extends chrome.events.Event<() => void> {
|
2587
|
+
export interface ButtonClickedEvent extends chrome.events.Event<() => void> {}
|
2565
2588
|
|
2566
2589
|
/** A button created by the extension. */
|
2567
2590
|
export interface Button {
|
@@ -2576,24 +2599,24 @@ declare namespace chrome.devtools.panels {
|
|
2576
2599
|
onClicked: ButtonClickedEvent;
|
2577
2600
|
}
|
2578
2601
|
|
2579
|
-
export interface SelectionChangedEvent extends chrome.events.Event<() => void> {
|
2602
|
+
export interface SelectionChangedEvent extends chrome.events.Event<() => void> {}
|
2580
2603
|
|
2581
2604
|
/** Represents the Elements panel. */
|
2582
2605
|
export interface ElementsPanel {
|
2583
|
-
|
2584
|
-
|
2585
|
-
|
2586
|
-
|
2587
|
-
|
2588
|
-
|
2589
|
-
|
2590
|
-
|
2591
|
-
|
2592
|
-
|
2593
|
-
|
2594
|
-
|
2595
|
-
|
2596
|
-
|
2606
|
+
/**
|
2607
|
+
* Creates a pane within panel's sidebar.
|
2608
|
+
* @param title Text that is displayed in sidebar caption.
|
2609
|
+
* @param callback A callback invoked when the sidebar is created.
|
2610
|
+
*/
|
2611
|
+
createSidebarPane(
|
2612
|
+
title: string,
|
2613
|
+
callback?: (
|
2614
|
+
/** An ExtensionSidebarPane object for created sidebar pane */
|
2615
|
+
result: ExtensionSidebarPane,
|
2616
|
+
) => void,
|
2617
|
+
): void;
|
2618
|
+
/** Fired when an object is selected in the panel. */
|
2619
|
+
onSelectionChanged: SelectionChangedEvent;
|
2597
2620
|
}
|
2598
2621
|
|
2599
2622
|
/**
|
@@ -2610,17 +2633,18 @@ declare namespace chrome.devtools.panels {
|
|
2610
2633
|
title: string,
|
2611
2634
|
callback?: (
|
2612
2635
|
/** An ExtensionSidebarPane object for created sidebar pane. */
|
2613
|
-
result: ExtensionSidebarPane
|
2614
|
-
) => void
|
2636
|
+
result: ExtensionSidebarPane,
|
2637
|
+
) => void,
|
2615
2638
|
): void;
|
2616
2639
|
/** Fired when an object is selected in the panel. */
|
2617
2640
|
onSelectionChanged: SelectionChangedEvent;
|
2618
2641
|
}
|
2619
2642
|
|
2620
2643
|
export interface ExtensionSidebarPaneShownEvent
|
2621
|
-
extends chrome.events.Event<(window: chrome.windows.Window) => void>
|
2644
|
+
extends chrome.events.Event<(window: chrome.windows.Window) => void>
|
2645
|
+
{}
|
2622
2646
|
|
2623
|
-
export interface ExtensionSidebarPaneHiddenEvent extends chrome.events.Event<() => void> {
|
2647
|
+
export interface ExtensionSidebarPaneHiddenEvent extends chrome.events.Event<() => void> {}
|
2624
2648
|
|
2625
2649
|
/** A sidebar created by the extension. */
|
2626
2650
|
export interface ExtensionSidebarPane {
|
@@ -2713,13 +2737,16 @@ declare namespace chrome.devtools.panels {
|
|
2713
2737
|
* @param callback A function that is called when the resource has been successfully loaded.
|
2714
2738
|
*/
|
2715
2739
|
export function openResource(
|
2716
|
-
|
2740
|
+
url: string,
|
2741
|
+
lineNumber: number,
|
2742
|
+
columnNumber: number,
|
2743
|
+
callback?: (response: unknown) => unknown,
|
2717
2744
|
): void;
|
2718
2745
|
/**
|
2719
2746
|
* @since Chrome 59.
|
2720
2747
|
* The name of the color theme set in user's DevTools settings.
|
2721
2748
|
*/
|
2722
|
-
export var themeName:
|
2749
|
+
export var themeName: "default" | "dark";
|
2723
2750
|
}
|
2724
2751
|
|
2725
2752
|
////////////////////
|
@@ -2841,7 +2868,36 @@ declare namespace chrome.downloads {
|
|
2841
2868
|
previous?: string | undefined;
|
2842
2869
|
}
|
2843
2870
|
|
2844
|
-
export type DownloadInterruptReason =
|
2871
|
+
export type DownloadInterruptReason =
|
2872
|
+
| "FILE_FAILED"
|
2873
|
+
| "FILE_ACCESS_DENIED"
|
2874
|
+
| "FILE_NO_SPACE"
|
2875
|
+
| "FILE_NAME_TOO_LONG"
|
2876
|
+
| "FILE_TOO_LARGE"
|
2877
|
+
| "FILE_VIRUS_INFECTED"
|
2878
|
+
| "FILE_TRANSIENT_ERROR"
|
2879
|
+
| "FILE_BLOCKED"
|
2880
|
+
| "FILE_SECURITY_CHECK_FAILED"
|
2881
|
+
| "FILE_TOO_SHORT"
|
2882
|
+
| "FILE_HASH_MISMATCH"
|
2883
|
+
| "FILE_SAME_AS_SOURCE"
|
2884
|
+
| "NETWORK_FAILED"
|
2885
|
+
| "NETWORK_TIMEOUT"
|
2886
|
+
| "NETWORK_DISCONNECTED"
|
2887
|
+
| "NETWORK_SERVER_DOWN"
|
2888
|
+
| "NETWORK_INVALID_REQUEST"
|
2889
|
+
| "SERVER_FAILED"
|
2890
|
+
| "SERVER_NO_RANGE"
|
2891
|
+
| "SERVER_BAD_CONTENT"
|
2892
|
+
| "SERVER_UNAUTHORIZED"
|
2893
|
+
| "SERVER_CERT_PROBLEM"
|
2894
|
+
| "SERVER_FORBIDDEN"
|
2895
|
+
| "SERVER_UNREACHABLE"
|
2896
|
+
| "SERVER_CONTENT_LENGTH_MISMATCH"
|
2897
|
+
| "SERVER_CROSS_ORIGIN_REDIRECT"
|
2898
|
+
| "USER_CANCELED"
|
2899
|
+
| "USER_SHUTDOWN"
|
2900
|
+
| "CRASH";
|
2845
2901
|
|
2846
2902
|
export type DownloadState = "in_progress" | "interrupted" | "complete";
|
2847
2903
|
|
@@ -2966,16 +3022,17 @@ declare namespace chrome.downloads {
|
|
2966
3022
|
enabled: boolean;
|
2967
3023
|
}
|
2968
3024
|
|
2969
|
-
export interface DownloadChangedEvent extends chrome.events.Event<(downloadDelta: DownloadDelta) => void> {
|
3025
|
+
export interface DownloadChangedEvent extends chrome.events.Event<(downloadDelta: DownloadDelta) => void> {}
|
2970
3026
|
|
2971
|
-
export interface DownloadCreatedEvent extends chrome.events.Event<(downloadItem: DownloadItem) => void> {
|
3027
|
+
export interface DownloadCreatedEvent extends chrome.events.Event<(downloadItem: DownloadItem) => void> {}
|
2972
3028
|
|
2973
|
-
export interface DownloadErasedEvent extends chrome.events.Event<(downloadId: number) => void> {
|
3029
|
+
export interface DownloadErasedEvent extends chrome.events.Event<(downloadId: number) => void> {}
|
2974
3030
|
|
2975
|
-
export interface DownloadDeterminingFilenameEvent
|
2976
|
-
|
3031
|
+
export interface DownloadDeterminingFilenameEvent extends
|
3032
|
+
chrome.events.Event<
|
2977
3033
|
(downloadItem: DownloadItem, suggest: (suggestion?: DownloadFilenameSuggestion) => void) => void
|
2978
|
-
>
|
3034
|
+
>
|
3035
|
+
{}
|
2979
3036
|
|
2980
3037
|
/**
|
2981
3038
|
* Find DownloadItem. Set query to the empty object to get all DownloadItem. To get a specific DownloadItem, set only the id field. To page through a large number of items, set orderBy: ['-startTime'], set limit to the number of items per page, and set startedAfter to the startTime of the last item from the last page.
|
@@ -3376,8 +3433,8 @@ declare namespace chrome.events {
|
|
3376
3433
|
getRules(
|
3377
3434
|
callback: (
|
3378
3435
|
/** Rules that were registered, the optional parameters are filled with values */
|
3379
|
-
rules: Rule[]
|
3380
|
-
) => void
|
3436
|
+
rules: Rule[],
|
3437
|
+
) => void,
|
3381
3438
|
): void;
|
3382
3439
|
/**
|
3383
3440
|
* Returns currently registered rules.
|
@@ -3388,8 +3445,8 @@ declare namespace chrome.events {
|
|
3388
3445
|
ruleIdentifiers: string[],
|
3389
3446
|
callback: (
|
3390
3447
|
/** Rules that were registered, the optional parameters are filled with values */
|
3391
|
-
rules: Rule[]
|
3392
|
-
) => void
|
3448
|
+
rules: Rule[],
|
3449
|
+
) => void,
|
3393
3450
|
): void;
|
3394
3451
|
/**
|
3395
3452
|
* @param callback Listener whose registration status shall be tested.
|
@@ -3415,8 +3472,8 @@ declare namespace chrome.events {
|
|
3415
3472
|
rules: Rule[],
|
3416
3473
|
callback?: (
|
3417
3474
|
/** Rules that were registered, the optional parameters are filled with values */
|
3418
|
-
rules: Rule[]
|
3419
|
-
) => void
|
3475
|
+
rules: Rule[],
|
3476
|
+
) => void,
|
3420
3477
|
): void;
|
3421
3478
|
/**
|
3422
3479
|
* Deregisters an event listener callback from an event.
|
@@ -3483,11 +3540,12 @@ declare namespace chrome.extension {
|
|
3483
3540
|
message: string;
|
3484
3541
|
}
|
3485
3542
|
|
3486
|
-
export interface OnRequestEvent
|
3487
|
-
|
3543
|
+
export interface OnRequestEvent extends
|
3544
|
+
chrome.events.Event<
|
3488
3545
|
| ((request: any, sender: runtime.MessageSender, sendResponse: (response: any) => void) => void)
|
3489
3546
|
| ((sender: runtime.MessageSender, sendResponse: (response: any) => void) => void)
|
3490
|
-
>
|
3547
|
+
>
|
3548
|
+
{}
|
3491
3549
|
|
3492
3550
|
/**
|
3493
3551
|
* Since Chrome 7.
|
@@ -3543,7 +3601,11 @@ declare namespace chrome.extension {
|
|
3543
3601
|
* function(any response) {...};
|
3544
3602
|
* Parameter response: The JSON response object sent by the handler of the request. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
|
3545
3603
|
*/
|
3546
|
-
export function sendRequest<Request = any, Response = any>(
|
3604
|
+
export function sendRequest<Request = any, Response = any>(
|
3605
|
+
extensionId: string,
|
3606
|
+
request: Request,
|
3607
|
+
responseCallback?: (response: Response) => void,
|
3608
|
+
): void;
|
3547
3609
|
/**
|
3548
3610
|
* Sends a single request to other listeners within the extension. Similar to runtime.connect, but only sends a single request with an optional response. The extension.onRequest event is fired in each page of the extension.
|
3549
3611
|
* @deprecated Deprecated since Chrome 33. Please use runtime.sendMessage.
|
@@ -3551,7 +3613,10 @@ declare namespace chrome.extension {
|
|
3551
3613
|
* function(any response) {...};
|
3552
3614
|
* Parameter response: The JSON response object sent by the handler of the request. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
|
3553
3615
|
*/
|
3554
|
-
export function sendRequest<Request = any, Response = any>(
|
3616
|
+
export function sendRequest<Request = any, Response = any>(
|
3617
|
+
request: Request,
|
3618
|
+
responseCallback?: (response: Response) => void,
|
3619
|
+
): void;
|
3555
3620
|
/**
|
3556
3621
|
* Returns an array of the JavaScript 'window' objects for each of the tabs running inside the current extension. If windowId is specified, returns only the 'window' objects of tabs attached to the specified window.
|
3557
3622
|
* @deprecated Deprecated since Chrome 33. Please use extension.getViews {type: "tab"}.
|
@@ -3607,7 +3672,8 @@ declare namespace chrome.fileBrowserHandler {
|
|
3607
3672
|
}
|
3608
3673
|
|
3609
3674
|
export interface FileBrowserHandlerExecuteEvent
|
3610
|
-
extends chrome.events.Event<(id: string, details: FileHandlerExecuteEventDetails) => void>
|
3675
|
+
extends chrome.events.Event<(id: string, details: FileHandlerExecuteEventDetails) => void>
|
3676
|
+
{}
|
3611
3677
|
|
3612
3678
|
/**
|
3613
3679
|
* Prompts user to select file path under which file should be saved. When the file is selected, file access permission required to use the file (read, write and create) are granted to the caller. The file will not actually get created during the function call, so function caller must ensure its existence before using it. The function has to be invoked with a user gesture.
|
@@ -3650,6 +3716,13 @@ declare namespace chrome.fileSystemProvider {
|
|
3650
3716
|
lastTag?: string | undefined;
|
3651
3717
|
}
|
3652
3718
|
|
3719
|
+
export interface CloudIdentifier {
|
3720
|
+
/** Identifier for the cloud storage provider (e.g. 'drive.google.com'). */
|
3721
|
+
providerName: string;
|
3722
|
+
/** The provider's identifier for the given file/directory. */
|
3723
|
+
id: string;
|
3724
|
+
}
|
3725
|
+
|
3653
3726
|
export interface EntryMetadata {
|
3654
3727
|
/** True if it is a directory. Must be provided if requested in `options`. */
|
3655
3728
|
isDirectory?: boolean;
|
@@ -3663,6 +3736,8 @@ declare namespace chrome.fileSystemProvider {
|
|
3663
3736
|
mimeType?: string | undefined;
|
3664
3737
|
/** Optional. Thumbnail image as a data URI in either PNG, JPEG or WEBP format, at most 32 KB in size. Optional, but can be provided only when explicitly requested by the onGetMetadataRequested event. */
|
3665
3738
|
thumbnail?: string | undefined;
|
3739
|
+
/** Optional. Cloud storage representation of this entry. Must be provided if requested in `options` and the file is backed by cloud storage. For local files not backed by cloud storage, it should be undefined when requested. */
|
3740
|
+
cloudIdentifier?: CloudIdentifier | undefined;
|
3666
3741
|
}
|
3667
3742
|
|
3668
3743
|
export interface FileSystemInfo {
|
@@ -3786,34 +3861,36 @@ declare namespace chrome.fileSystemProvider {
|
|
3786
3861
|
}
|
3787
3862
|
|
3788
3863
|
export interface MetadataRequestedEventOptions extends EntryPathRequestedEventOptions {
|
3789
|
-
/** Set to true if
|
3790
|
-
thumbnail: boolean;
|
3791
|
-
/** Set to true if is_directory value is requested. */
|
3864
|
+
/** Set to true if `is_directory` value is requested. */
|
3792
3865
|
isDirectory: boolean;
|
3793
|
-
/** Set to true if name value is requested. */
|
3866
|
+
/** Set to true if `name` value is requested. */
|
3794
3867
|
name: boolean;
|
3795
|
-
/** Set to true if size value is requested. */
|
3868
|
+
/** Set to true if `size` value is requested. */
|
3796
3869
|
size: boolean;
|
3797
|
-
/** Set to true if modificationTime value is requested. */
|
3870
|
+
/** Set to true if `modificationTime` value is requested. */
|
3798
3871
|
modificationTime: boolean;
|
3799
|
-
/** Set to true if mimeType value is requested. */
|
3872
|
+
/** Set to true if `mimeType` value is requested. */
|
3800
3873
|
mimeType: boolean;
|
3874
|
+
/** Set to true if `thumbnail` is requested. */
|
3875
|
+
thumbnail: boolean;
|
3876
|
+
/** Set to true if `cloudIdentifier` is requested. */
|
3877
|
+
cloudIdentifier: boolean;
|
3801
3878
|
}
|
3802
3879
|
|
3803
3880
|
export interface DirectoryPathRequestedEventOptions extends RequestedEventOptions {
|
3804
3881
|
/** The path of the directory which is to be operated on. */
|
3805
3882
|
directoryPath: string;
|
3806
|
-
/** Set to true if is_directory value is requested. */
|
3883
|
+
/** Set to true if `is_directory` value is requested. */
|
3807
3884
|
isDirectory: boolean;
|
3808
|
-
/** Set to true if name value is requested. */
|
3885
|
+
/** Set to true if `name` value is requested. */
|
3809
3886
|
name: boolean;
|
3810
|
-
/** Set to true if size value is requested. */
|
3887
|
+
/** Set to true if `size` value is requested. */
|
3811
3888
|
size: boolean;
|
3812
|
-
/** Set to true if modificationTime value is requested. */
|
3889
|
+
/** Set to true if `modificationTime` value is requested. */
|
3813
3890
|
modificationTime: boolean;
|
3814
|
-
/** Set to true if mimeType value is requested. */
|
3891
|
+
/** Set to true if `mimeType` value is requested. */
|
3815
3892
|
mimeType: boolean;
|
3816
|
-
/** Set to true if
|
3893
|
+
/** Set to true if `thumbnail` is requested. */
|
3817
3894
|
thumbnail: boolean;
|
3818
3895
|
}
|
3819
3896
|
|
@@ -3873,139 +3950,155 @@ declare namespace chrome.fileSystemProvider {
|
|
3873
3950
|
operationRequestId: number;
|
3874
3951
|
}
|
3875
3952
|
|
3876
|
-
export interface RequestedEvent
|
3877
|
-
|
3953
|
+
export interface RequestedEvent extends
|
3954
|
+
chrome.events.Event<
|
3878
3955
|
(options: RequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void
|
3879
|
-
>
|
3956
|
+
>
|
3957
|
+
{}
|
3880
3958
|
|
3881
|
-
export interface MetadataRequestedEvent
|
3882
|
-
|
3959
|
+
export interface MetadataRequestedEvent extends
|
3960
|
+
chrome.events.Event<
|
3883
3961
|
(
|
3884
3962
|
options: MetadataRequestedEventOptions,
|
3885
3963
|
successCallback: (metadata: EntryMetadata) => void,
|
3886
3964
|
errorCallback: (error: string) => void,
|
3887
3965
|
) => void
|
3888
|
-
>
|
3966
|
+
>
|
3967
|
+
{}
|
3889
3968
|
|
3890
|
-
export interface DirectoryPathRequestedEvent
|
3891
|
-
|
3969
|
+
export interface DirectoryPathRequestedEvent extends
|
3970
|
+
chrome.events.Event<
|
3892
3971
|
(
|
3893
3972
|
options: DirectoryPathRequestedEventOptions,
|
3894
3973
|
successCallback: (entries: EntryMetadata[], hasMore: boolean) => void,
|
3895
3974
|
errorCallback: (error: string) => void,
|
3896
3975
|
) => void
|
3897
|
-
>
|
3976
|
+
>
|
3977
|
+
{}
|
3898
3978
|
|
3899
|
-
export interface OpenFileRequestedEvent
|
3900
|
-
|
3979
|
+
export interface OpenFileRequestedEvent extends
|
3980
|
+
chrome.events.Event<
|
3901
3981
|
(
|
3902
3982
|
options: OpenFileRequestedEventOptions,
|
3903
3983
|
successCallback: Function,
|
3904
3984
|
errorCallback: (error: string) => void,
|
3905
3985
|
) => void
|
3906
|
-
>
|
3986
|
+
>
|
3987
|
+
{}
|
3907
3988
|
|
3908
|
-
export interface OpenedFileRequestedEvent
|
3909
|
-
|
3989
|
+
export interface OpenedFileRequestedEvent extends
|
3990
|
+
chrome.events.Event<
|
3910
3991
|
(
|
3911
3992
|
options: OpenedFileRequestedEventOptions,
|
3912
3993
|
successCallback: Function,
|
3913
3994
|
errorCallback: (error: string) => void,
|
3914
3995
|
) => void
|
3915
|
-
>
|
3996
|
+
>
|
3997
|
+
{}
|
3916
3998
|
|
3917
|
-
export interface OpenedFileOffsetRequestedEvent
|
3918
|
-
|
3999
|
+
export interface OpenedFileOffsetRequestedEvent extends
|
4000
|
+
chrome.events.Event<
|
3919
4001
|
(
|
3920
4002
|
options: OpenedFileOffsetRequestedEventOptions,
|
3921
4003
|
successCallback: (data: ArrayBuffer, hasMore: boolean) => void,
|
3922
4004
|
errorCallback: (error: string) => void,
|
3923
4005
|
) => void
|
3924
|
-
>
|
4006
|
+
>
|
4007
|
+
{}
|
3925
4008
|
|
3926
|
-
export interface DirectoryPathRecursiveRequestedEvent
|
3927
|
-
|
4009
|
+
export interface DirectoryPathRecursiveRequestedEvent extends
|
4010
|
+
chrome.events.Event<
|
3928
4011
|
(
|
3929
4012
|
options: DirectoryPathRecursiveRequestedEventOptions,
|
3930
4013
|
successCallback: Function,
|
3931
4014
|
errorCallback: (error: string) => void,
|
3932
4015
|
) => void
|
3933
|
-
>
|
4016
|
+
>
|
4017
|
+
{}
|
3934
4018
|
|
3935
|
-
export interface EntryPathRecursiveRequestedEvent
|
3936
|
-
|
4019
|
+
export interface EntryPathRecursiveRequestedEvent extends
|
4020
|
+
chrome.events.Event<
|
3937
4021
|
(
|
3938
4022
|
options: EntryPathRecursiveRequestedEventOptions,
|
3939
4023
|
successCallback: Function,
|
3940
4024
|
errorCallback: (error: string) => void,
|
3941
4025
|
) => void
|
3942
|
-
>
|
4026
|
+
>
|
4027
|
+
{}
|
3943
4028
|
|
3944
|
-
export interface FilePathRequestedEvent
|
3945
|
-
|
4029
|
+
export interface FilePathRequestedEvent extends
|
4030
|
+
chrome.events.Event<
|
3946
4031
|
(
|
3947
4032
|
options: FilePathRequestedEventOptions,
|
3948
4033
|
successCallback: Function,
|
3949
4034
|
errorCallback: (error: string) => void,
|
3950
4035
|
) => void
|
3951
|
-
>
|
4036
|
+
>
|
4037
|
+
{}
|
3952
4038
|
|
3953
|
-
export interface SourceTargetPathRequestedEvent
|
3954
|
-
|
4039
|
+
export interface SourceTargetPathRequestedEvent extends
|
4040
|
+
chrome.events.Event<
|
3955
4041
|
(
|
3956
4042
|
options: SourceTargetPathRequestedEventOptions,
|
3957
4043
|
successCallback: Function,
|
3958
4044
|
errorCallback: (error: string) => void,
|
3959
4045
|
) => void
|
3960
|
-
>
|
4046
|
+
>
|
4047
|
+
{}
|
3961
4048
|
|
3962
|
-
export interface FilePathLengthRequestedEvent
|
3963
|
-
|
4049
|
+
export interface FilePathLengthRequestedEvent extends
|
4050
|
+
chrome.events.Event<
|
3964
4051
|
(
|
3965
4052
|
options: FilePathLengthRequestedEventOptions,
|
3966
4053
|
successCallback: Function,
|
3967
4054
|
errorCallback: (error: string) => void,
|
3968
4055
|
) => void
|
3969
|
-
>
|
4056
|
+
>
|
4057
|
+
{}
|
3970
4058
|
|
3971
|
-
export interface OpenedFileIoRequestedEvent
|
3972
|
-
|
4059
|
+
export interface OpenedFileIoRequestedEvent extends
|
4060
|
+
chrome.events.Event<
|
3973
4061
|
(
|
3974
4062
|
options: OpenedFileIoRequestedEventOptions,
|
3975
4063
|
successCallback: Function,
|
3976
4064
|
errorCallback: (error: string) => void,
|
3977
4065
|
) => void
|
3978
|
-
>
|
4066
|
+
>
|
4067
|
+
{}
|
3979
4068
|
|
3980
|
-
export interface OperationRequestedEvent
|
3981
|
-
|
4069
|
+
export interface OperationRequestedEvent extends
|
4070
|
+
chrome.events.Event<
|
3982
4071
|
(
|
3983
4072
|
options: OperationRequestedEventOptions,
|
3984
4073
|
successCallback: Function,
|
3985
4074
|
errorCallback: (error: string) => void,
|
3986
4075
|
) => void
|
3987
|
-
>
|
4076
|
+
>
|
4077
|
+
{}
|
3988
4078
|
|
3989
4079
|
export interface OptionlessRequestedEvent
|
3990
|
-
extends chrome.events.Event<(successCallback: Function, errorCallback: (error: string) => void) => void>
|
4080
|
+
extends chrome.events.Event<(successCallback: Function, errorCallback: (error: string) => void) => void>
|
4081
|
+
{}
|
3991
4082
|
|
3992
|
-
export interface GetActionsRequested
|
3993
|
-
|
4083
|
+
export interface GetActionsRequested extends
|
4084
|
+
chrome.events.Event<
|
3994
4085
|
(
|
3995
4086
|
options: GetActionsRequestedOptions,
|
3996
4087
|
successCallback: (actions: Action[]) => void,
|
3997
4088
|
errorCallback: (error: string) => void,
|
3998
4089
|
) => void
|
3999
|
-
>
|
4090
|
+
>
|
4091
|
+
{}
|
4000
4092
|
|
4001
|
-
export interface ExecuteActionRequested
|
4002
|
-
|
4093
|
+
export interface ExecuteActionRequested extends
|
4094
|
+
chrome.events.Event<
|
4003
4095
|
(
|
4004
4096
|
options: ExecuteActionRequestedOptions,
|
4005
4097
|
successCallback: () => void,
|
4006
4098
|
errorCallback: (error: string) => void,
|
4007
4099
|
) => void
|
4008
|
-
>
|
4100
|
+
>
|
4101
|
+
{}
|
4009
4102
|
|
4010
4103
|
/**
|
4011
4104
|
* Mounts a file system with the given fileSystemId and displayName. displayName will be shown in the left panel of Files.app. displayName can contain any characters including '/', but cannot be an empty string. displayName must be descriptive but doesn't have to be unique. The fileSystemId must not be an empty string.
|
@@ -4134,12 +4227,12 @@ declare namespace chrome.fontSettings {
|
|
4134
4227
|
export interface FontDetails {
|
4135
4228
|
/** The generic font family for the font. */
|
4136
4229
|
genericFamily:
|
4137
|
-
|
4138
|
-
|
4139
|
-
|
4140
|
-
|
4141
|
-
|
4142
|
-
|
4230
|
+
| "cursive"
|
4231
|
+
| "fantasy"
|
4232
|
+
| "fixed"
|
4233
|
+
| "sansserif"
|
4234
|
+
| "serif"
|
4235
|
+
| "standard";
|
4143
4236
|
/** Optional. The script for the font. If omitted, the global script font setting is affected. */
|
4144
4237
|
script?: string | undefined;
|
4145
4238
|
}
|
@@ -4179,19 +4272,19 @@ declare namespace chrome.fontSettings {
|
|
4179
4272
|
fontId: string;
|
4180
4273
|
}
|
4181
4274
|
|
4182
|
-
export interface DefaultFixedFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> {
|
4275
|
+
export interface DefaultFixedFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> {}
|
4183
4276
|
|
4184
|
-
export interface DefaultFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> {
|
4277
|
+
export interface DefaultFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> {}
|
4185
4278
|
|
4186
|
-
export interface MinimumFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> {
|
4279
|
+
export interface MinimumFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> {}
|
4187
4280
|
|
4188
|
-
export interface FontChangedEvent extends chrome.events.Event<(details: FullFontDetails) => void> {
|
4281
|
+
export interface FontChangedEvent extends chrome.events.Event<(details: FullFontDetails) => void> {}
|
4189
4282
|
|
4190
4283
|
/**
|
4191
4284
|
* Sets the default font size.
|
4192
4285
|
* @return The `setDefaultFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
4193
4286
|
*/
|
4194
|
-
export function setDefaultFontSize(details: DefaultFontSizeDetails): Promise<void
|
4287
|
+
export function setDefaultFontSize(details: DefaultFontSizeDetails): Promise<void>;
|
4195
4288
|
/**
|
4196
4289
|
* Sets the default font size.
|
4197
4290
|
*/
|
@@ -4200,7 +4293,7 @@ declare namespace chrome.fontSettings {
|
|
4200
4293
|
* Gets the font for a given script and generic font family.
|
4201
4294
|
* @return The `getFont` method provides its result via callback or returned as a `Promise` (MV3 only).
|
4202
4295
|
*/
|
4203
|
-
export function getFont(details: FontDetails): Promise<FontDetailsResult
|
4296
|
+
export function getFont(details: FontDetails): Promise<FontDetailsResult>;
|
4204
4297
|
/**
|
4205
4298
|
* Gets the font for a given script and generic font family.
|
4206
4299
|
*/
|
@@ -4377,11 +4470,11 @@ declare namespace chrome.gcm {
|
|
4377
4470
|
detail: Object;
|
4378
4471
|
}
|
4379
4472
|
|
4380
|
-
export interface MessageReceptionEvent extends chrome.events.Event<(message: IncomingMessage) => void> {
|
4473
|
+
export interface MessageReceptionEvent extends chrome.events.Event<(message: IncomingMessage) => void> {}
|
4381
4474
|
|
4382
|
-
export interface MessageDeletionEvent extends chrome.events.Event<() => void> {
|
4475
|
+
export interface MessageDeletionEvent extends chrome.events.Event<() => void> {}
|
4383
4476
|
|
4384
|
-
export interface GcmErrorEvent extends chrome.events.Event<(error: GcmError) => void> {
|
4477
|
+
export interface GcmErrorEvent extends chrome.events.Event<(error: GcmError) => void> {}
|
4385
4478
|
|
4386
4479
|
/** The maximum size (in bytes) of all key/value pairs in a message. */
|
4387
4480
|
export var MAX_MESSAGE_SIZE: number;
|
@@ -4483,9 +4576,9 @@ declare namespace chrome.history {
|
|
4483
4576
|
urls?: string[] | undefined;
|
4484
4577
|
}
|
4485
4578
|
|
4486
|
-
export interface HistoryVisitedEvent extends chrome.events.Event<(result: HistoryItem) => void> {
|
4579
|
+
export interface HistoryVisitedEvent extends chrome.events.Event<(result: HistoryItem) => void> {}
|
4487
4580
|
|
4488
|
-
export interface HistoryVisitRemovedEvent extends chrome.events.Event<(removed: RemovedResult) => void> {
|
4581
|
+
export interface HistoryVisitRemovedEvent extends chrome.events.Event<(removed: RemovedResult) => void> {}
|
4489
4582
|
|
4490
4583
|
/**
|
4491
4584
|
* Searches the history for the last visit time of each page matching the query.
|
@@ -4628,8 +4721,8 @@ declare namespace chrome.identity {
|
|
4628
4721
|
|
4629
4722
|
/** @since Chrome 84. */
|
4630
4723
|
export enum AccountStatus {
|
4631
|
-
SYNC =
|
4632
|
-
ANY =
|
4724
|
+
SYNC = "SYNC",
|
4725
|
+
ANY = "ANY",
|
4633
4726
|
}
|
4634
4727
|
|
4635
4728
|
export interface ProfileDetails {
|
@@ -4686,19 +4779,19 @@ declare namespace chrome.identity {
|
|
4686
4779
|
interactive?: boolean | undefined;
|
4687
4780
|
}
|
4688
4781
|
|
4689
|
-
export interface SignInChangeEvent extends chrome.events.Event<(account: AccountInfo, signedIn: boolean) => void> {
|
4782
|
+
export interface SignInChangeEvent extends chrome.events.Event<(account: AccountInfo, signedIn: boolean) => void> {}
|
4690
4783
|
|
4691
4784
|
export interface GetAuthTokenResult {
|
4692
4785
|
/**
|
4693
4786
|
* Optional.
|
4694
4787
|
* A list of OAuth2 scopes granted to the extension.
|
4695
4788
|
*/
|
4696
|
-
grantedScopes?: string[]
|
4789
|
+
grantedScopes?: string[];
|
4697
4790
|
/**
|
4698
4791
|
* Optional.
|
4699
4792
|
* The specific token associated with the request.
|
4700
4793
|
*/
|
4701
|
-
token?: string
|
4794
|
+
token?: string;
|
4702
4795
|
}
|
4703
4796
|
|
4704
4797
|
/**
|
@@ -4731,7 +4824,10 @@ declare namespace chrome.identity {
|
|
4731
4824
|
* @param callback Called with an OAuth2 access token as specified by the manifest, or undefined if there was an error.
|
4732
4825
|
*/
|
4733
4826
|
export function getAuthToken(details: TokenDetails): Promise<GetAuthTokenResult>;
|
4734
|
-
export function getAuthToken(
|
4827
|
+
export function getAuthToken(
|
4828
|
+
details: TokenDetails,
|
4829
|
+
callback: (token?: string, grantedScopes?: string[]) => void,
|
4830
|
+
): void;
|
4735
4831
|
|
4736
4832
|
/**
|
4737
4833
|
* Retrieves email address and obfuscated gaia id of the user signed into a profile.
|
@@ -4790,8 +4886,8 @@ declare namespace chrome.identity {
|
|
4790
4886
|
* @since Chrome 6.
|
4791
4887
|
*/
|
4792
4888
|
declare namespace chrome.idle {
|
4793
|
-
export type IdleState =
|
4794
|
-
export interface IdleStateChangedEvent extends chrome.events.Event<(newState: IdleState) => void> {
|
4889
|
+
export type IdleState = "active" | "idle" | "locked";
|
4890
|
+
export interface IdleStateChangedEvent extends chrome.events.Event<(newState: IdleState) => void> {}
|
4795
4891
|
|
4796
4892
|
/**
|
4797
4893
|
* Returns "locked" if the system is locked, "idle" if the user has not generated any input for a specified number of seconds, or "active" otherwise.
|
@@ -4884,10 +4980,10 @@ declare namespace chrome.input.ime {
|
|
4884
4980
|
}
|
4885
4981
|
|
4886
4982
|
/**
|
4887
|
-
|
4888
|
-
|
4889
|
-
|
4890
|
-
export type AutoCapitalizeType =
|
4983
|
+
* The auto-capitalize type of the text field.
|
4984
|
+
* @since Chrome 69.
|
4985
|
+
*/
|
4986
|
+
export type AutoCapitalizeType = "characters" | "words" | "sentences";
|
4891
4987
|
/** Describes an input Context */
|
4892
4988
|
export interface InputContext {
|
4893
4989
|
/** This is used to specify targets of text field operations. This ID becomes invalid as soon as onBlur is called. */
|
@@ -5025,10 +5121,10 @@ declare namespace chrome.input.ime {
|
|
5025
5121
|
}
|
5026
5122
|
|
5027
5123
|
/** Type of the assistive window. */
|
5028
|
-
export type AssistiveWindowType =
|
5124
|
+
export type AssistiveWindowType = "undo";
|
5029
5125
|
|
5030
5126
|
/** ID of a button in an assistive window. */
|
5031
|
-
export type AssistiveWindowButton =
|
5127
|
+
export type AssistiveWindowButton = "undo" | "addToDictionary";
|
5032
5128
|
|
5033
5129
|
/** Properties of an assistive window. */
|
5034
5130
|
export interface AssistiveWindowProperties {
|
@@ -5140,30 +5236,35 @@ declare namespace chrome.input.ime {
|
|
5140
5236
|
windowType: AssistiveWindowType;
|
5141
5237
|
}
|
5142
5238
|
|
5143
|
-
export interface BlurEvent extends chrome.events.Event<(contextID: number) => void> {
|
5239
|
+
export interface BlurEvent extends chrome.events.Event<(contextID: number) => void> {}
|
5144
5240
|
|
5145
5241
|
export interface AssistiveWindowButtonClickedEvent
|
5146
|
-
extends chrome.events.Event<(details: AssistiveWindowButtonClickedDetails) => void>
|
5242
|
+
extends chrome.events.Event<(details: AssistiveWindowButtonClickedDetails) => void>
|
5243
|
+
{}
|
5147
5244
|
|
5148
5245
|
export interface CandidateClickedEvent
|
5149
|
-
extends chrome.events.Event<(engineID: string, candidateID: number, button: string) => void>
|
5246
|
+
extends chrome.events.Event<(engineID: string, candidateID: number, button: string) => void>
|
5247
|
+
{}
|
5150
5248
|
|
5151
|
-
export interface KeyEventEvent
|
5249
|
+
export interface KeyEventEvent
|
5250
|
+
extends chrome.events.Event<(engineID: string, keyData: KeyboardEvent, requestId: string) => void>
|
5251
|
+
{}
|
5152
5252
|
|
5153
|
-
export interface DeactivatedEvent extends chrome.events.Event<(engineID: string) => void> {
|
5253
|
+
export interface DeactivatedEvent extends chrome.events.Event<(engineID: string) => void> {}
|
5154
5254
|
|
5155
|
-
export interface InputContextUpdateEvent extends chrome.events.Event<(context: InputContext) => void> {
|
5255
|
+
export interface InputContextUpdateEvent extends chrome.events.Event<(context: InputContext) => void> {}
|
5156
5256
|
|
5157
|
-
export interface ActivateEvent extends chrome.events.Event<(engineID: string, screen: string) => void> {
|
5257
|
+
export interface ActivateEvent extends chrome.events.Event<(engineID: string, screen: string) => void> {}
|
5158
5258
|
|
5159
|
-
export interface FocusEvent extends chrome.events.Event<(context: InputContext) => void> {
|
5259
|
+
export interface FocusEvent extends chrome.events.Event<(context: InputContext) => void> {}
|
5160
5260
|
|
5161
|
-
export interface MenuItemActivatedEvent extends chrome.events.Event<(engineID: string, name: string) => void> {
|
5261
|
+
export interface MenuItemActivatedEvent extends chrome.events.Event<(engineID: string, name: string) => void> {}
|
5162
5262
|
|
5163
5263
|
export interface SurroundingTextChangedEvent
|
5164
|
-
extends chrome.events.Event<(engineID: string, surroundingInfo: SurroundingTextInfo) => void>
|
5264
|
+
extends chrome.events.Event<(engineID: string, surroundingInfo: SurroundingTextInfo) => void>
|
5265
|
+
{}
|
5165
5266
|
|
5166
|
-
export interface InputResetEvent extends chrome.events.Event<(engineID: string) => void> {
|
5267
|
+
export interface InputResetEvent extends chrome.events.Event<(engineID: string) => void> {}
|
5167
5268
|
|
5168
5269
|
/**
|
5169
5270
|
* Adds the provided menu items to the language menu when this IME is active.
|
@@ -5304,13 +5405,13 @@ declare namespace chrome.input.ime {
|
|
5304
5405
|
* Important: This API works only on Chrome OS.
|
5305
5406
|
*/
|
5306
5407
|
declare namespace chrome.loginState {
|
5307
|
-
export interface SessionStateChangedEvent extends chrome.events.Event<(sessionState: SessionState) => void> {
|
5408
|
+
export interface SessionStateChangedEvent extends chrome.events.Event<(sessionState: SessionState) => void> {}
|
5308
5409
|
|
5309
5410
|
/** Possible profile types. */
|
5310
|
-
export type ProfileType =
|
5411
|
+
export type ProfileType = "SIGNIN_PROFILE" | "USER_PROFILE";
|
5311
5412
|
|
5312
5413
|
/** Possible session states. */
|
5313
|
-
export type SessionState =
|
5414
|
+
export type SessionState = "UNKNOWN" | "IN_OOBE_SCREEN" | "IN_LOGIN_SCREEN" | "IN_SESSION" | "IN_LOCK_SCREEN";
|
5314
5415
|
|
5315
5416
|
/** Gets the type of the profile the extension is in. */
|
5316
5417
|
export function getProfileType(callback: (profileType: ProfileType) => void): void;
|
@@ -5443,13 +5544,13 @@ declare namespace chrome.management {
|
|
5443
5544
|
showConfirmDialog?: boolean | undefined;
|
5444
5545
|
}
|
5445
5546
|
|
5446
|
-
export interface ManagementDisabledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> {
|
5547
|
+
export interface ManagementDisabledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> {}
|
5447
5548
|
|
5448
|
-
export interface ManagementUninstalledEvent extends chrome.events.Event<(id: string) => void> {
|
5549
|
+
export interface ManagementUninstalledEvent extends chrome.events.Event<(id: string) => void> {}
|
5449
5550
|
|
5450
|
-
export interface ManagementInstalledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> {
|
5551
|
+
export interface ManagementInstalledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> {}
|
5451
5552
|
|
5452
|
-
export interface ManagementEnabledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> {
|
5553
|
+
export interface ManagementEnabledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> {}
|
5453
5554
|
|
5454
5555
|
/**
|
5455
5556
|
* Enables or disables an app or extension.
|
@@ -5670,7 +5771,7 @@ declare namespace chrome.networking.config {
|
|
5670
5771
|
Security?: string | undefined;
|
5671
5772
|
}
|
5672
5773
|
|
5673
|
-
export interface CaptivePorttalDetectedEvent extends chrome.events.Event<(networkInfo: NetworkInfo) => void> {
|
5774
|
+
export interface CaptivePorttalDetectedEvent extends chrome.events.Event<(networkInfo: NetworkInfo) => void> {}
|
5674
5775
|
|
5675
5776
|
/**
|
5676
5777
|
* Allows an extension to define network filters for the networks it can handle. A call to this function will remove all filters previously installed by the extension before setting the new list.
|
@@ -5718,91 +5819,96 @@ declare namespace chrome.notifications {
|
|
5718
5819
|
message: string;
|
5719
5820
|
}
|
5720
5821
|
|
5721
|
-
export type NotificationOptions<T extends boolean = false> =
|
5722
|
-
|
5723
|
-
|
5724
|
-
|
5725
|
-
|
5726
|
-
|
5727
|
-
|
5728
|
-
|
5729
|
-
|
5730
|
-
|
5731
|
-
|
5732
|
-
|
5733
|
-
|
5734
|
-
|
5735
|
-
|
5736
|
-
|
5737
|
-
|
5738
|
-
|
5739
|
-
|
5740
|
-
|
5741
|
-
|
5742
|
-
|
5743
|
-
|
5744
|
-
|
5745
|
-
|
5746
|
-
|
5747
|
-
|
5748
|
-
|
5749
|
-
|
5750
|
-
|
5751
|
-
|
5752
|
-
|
5753
|
-
|
5754
|
-
|
5755
|
-
|
5756
|
-
|
5757
|
-
|
5758
|
-
|
5759
|
-
|
5760
|
-
|
5761
|
-
|
5762
|
-
|
5763
|
-
|
5764
|
-
|
5765
|
-
|
5766
|
-
|
5767
|
-
|
5768
|
-
|
5769
|
-
|
5770
|
-
|
5771
|
-
|
5772
|
-
|
5773
|
-
|
5774
|
-
|
5775
|
-
|
5776
|
-
|
5777
|
-
|
5778
|
-
|
5779
|
-
|
5780
|
-
|
5781
|
-
|
5782
|
-
|
5783
|
-
|
5784
|
-
|
5785
|
-
|
5786
|
-
|
5787
|
-
|
5788
|
-
|
5789
|
-
|
5790
|
-
|
5791
|
-
|
5792
|
-
|
5793
|
-
|
5822
|
+
export type NotificationOptions<T extends boolean = false> =
|
5823
|
+
& {
|
5824
|
+
/**
|
5825
|
+
* Optional.
|
5826
|
+
* Alternate notification content with a lower-weight font.
|
5827
|
+
* @since Chrome 31.
|
5828
|
+
*/
|
5829
|
+
contextMessage?: string | undefined;
|
5830
|
+
/** Optional. Priority ranges from -2 to 2. -2 is lowest priority. 2 is highest. Zero is default. */
|
5831
|
+
priority?: number | undefined;
|
5832
|
+
/** Optional. A timestamp associated with the notification, in milliseconds past the epoch (e.g. Date.now() + n). */
|
5833
|
+
eventTime?: number | undefined;
|
5834
|
+
/** Optional. Text and icons for up to two notification action buttons. */
|
5835
|
+
buttons?: ButtonOptions[] | undefined;
|
5836
|
+
/** Optional. Items for multi-item notifications. */
|
5837
|
+
items?: ItemOptions[] | undefined;
|
5838
|
+
/**
|
5839
|
+
* Optional.
|
5840
|
+
* Current progress ranges from 0 to 100.
|
5841
|
+
* @since Chrome 30.
|
5842
|
+
*/
|
5843
|
+
progress?: number | undefined;
|
5844
|
+
/**
|
5845
|
+
* Optional.
|
5846
|
+
* Whether to show UI indicating that the app will visibly respond to clicks on the body of a notification.
|
5847
|
+
* @since Chrome 32.
|
5848
|
+
*/
|
5849
|
+
isClickable?: boolean | undefined;
|
5850
|
+
/**
|
5851
|
+
* Optional.
|
5852
|
+
* A URL to the app icon mask. URLs have the same restrictions as iconUrl. The app icon mask should be in alpha channel, as only the alpha channel of the image will be considered.
|
5853
|
+
* @since Chrome 38.
|
5854
|
+
*/
|
5855
|
+
appIconMaskUrl?: string | undefined;
|
5856
|
+
/** Optional. A URL to the image thumbnail for image-type notifications. URLs have the same restrictions as iconUrl. */
|
5857
|
+
imageUrl?: string | undefined;
|
5858
|
+
/**
|
5859
|
+
* Indicates that the notification should remain visible on screen until the user activates or dismisses the notification.
|
5860
|
+
* This defaults to false.
|
5861
|
+
* @since Chrome 50
|
5862
|
+
*/
|
5863
|
+
requireInteraction?: boolean | undefined;
|
5864
|
+
/**
|
5865
|
+
* Optional.
|
5866
|
+
* Indicates that no sounds or vibrations should be made when the notification is being shown. This defaults to false.
|
5867
|
+
* @since Chrome 70
|
5868
|
+
*/
|
5869
|
+
silent?: boolean | undefined;
|
5870
|
+
}
|
5871
|
+
& (T extends true ? {
|
5872
|
+
/**
|
5873
|
+
* A URL to the sender's avatar, app icon, or a thumbnail for image notifications.
|
5874
|
+
* URLs can be a data URL, a blob URL, or a URL relative to a resource within this extension's .crx file. Required for notifications.create method.
|
5875
|
+
*/
|
5876
|
+
iconUrl: string;
|
5877
|
+
/** Main notification content. Required for notifications.create method. */
|
5878
|
+
message: string;
|
5879
|
+
/** Which type of notification to display. Required for notifications.create method. */
|
5880
|
+
type: TemplateType;
|
5881
|
+
/** Title of the notification (e.g. sender name for email). Required for notifications.create method. */
|
5882
|
+
title: string;
|
5883
|
+
}
|
5884
|
+
: {
|
5885
|
+
/**
|
5886
|
+
* Optional.
|
5887
|
+
* A URL to the sender's avatar, app icon, or a thumbnail for image notifications.
|
5888
|
+
* URLs can be a data URL, a blob URL, or a URL relative to a resource within this extension's .crx file. Required for notifications.create method.
|
5889
|
+
*/
|
5890
|
+
iconUrl?: string | undefined;
|
5891
|
+
/** Optional. Main notification content. Required for notifications.create method. */
|
5892
|
+
message?: string | undefined;
|
5893
|
+
/** Optional. Which type of notification to display. Required for notifications.create method. */
|
5894
|
+
type?: TemplateType | undefined;
|
5895
|
+
/** Optional. Title of the notification (e.g. sender name for email). Required for notifications.create method. */
|
5896
|
+
title?: string | undefined;
|
5897
|
+
});
|
5794
5898
|
|
5795
5899
|
export interface NotificationClosedEvent
|
5796
|
-
extends chrome.events.Event<(notificationId: string, byUser: boolean) => void>
|
5900
|
+
extends chrome.events.Event<(notificationId: string, byUser: boolean) => void>
|
5901
|
+
{}
|
5797
5902
|
|
5798
|
-
export interface NotificationClickedEvent extends chrome.events.Event<(notificationId: string) => void> {
|
5903
|
+
export interface NotificationClickedEvent extends chrome.events.Event<(notificationId: string) => void> {}
|
5799
5904
|
|
5800
5905
|
export interface NotificationButtonClickedEvent
|
5801
|
-
extends chrome.events.Event<(notificationId: string, buttonIndex: number) => void>
|
5906
|
+
extends chrome.events.Event<(notificationId: string, buttonIndex: number) => void>
|
5907
|
+
{}
|
5802
5908
|
|
5803
|
-
export interface NotificationPermissionLevelChangedEvent extends chrome.events.Event<(level: string) => void> {
|
5909
|
+
export interface NotificationPermissionLevelChangedEvent extends chrome.events.Event<(level: string) => void> {}
|
5804
5910
|
|
5805
|
-
export interface NotificationShowSettingsEvent extends chrome.events.Event<() => void> {
|
5911
|
+
export interface NotificationShowSettingsEvent extends chrome.events.Event<() => void> {}
|
5806
5912
|
|
5807
5913
|
/** The notification closed, either by the system or by user action. */
|
5808
5914
|
export var onClosed: NotificationClosedEvent;
|
@@ -5989,19 +6095,21 @@ declare namespace chrome.omnibox {
|
|
5989
6095
|
}
|
5990
6096
|
|
5991
6097
|
/** The window disposition for the omnibox query. This is the recommended context to display results. */
|
5992
|
-
export type OnInputEnteredDisposition =
|
6098
|
+
export type OnInputEnteredDisposition = "currentTab" | "newForegroundTab" | "newBackgroundTab";
|
5993
6099
|
|
5994
6100
|
export interface OmniboxInputEnteredEvent
|
5995
|
-
extends chrome.events.Event<(text: string, disposition: OnInputEnteredDisposition) => void>
|
6101
|
+
extends chrome.events.Event<(text: string, disposition: OnInputEnteredDisposition) => void>
|
6102
|
+
{}
|
5996
6103
|
|
5997
6104
|
export interface OmniboxInputChangedEvent
|
5998
|
-
extends chrome.events.Event<(text: string, suggest: (suggestResults: SuggestResult[]) => void) => void>
|
6105
|
+
extends chrome.events.Event<(text: string, suggest: (suggestResults: SuggestResult[]) => void) => void>
|
6106
|
+
{}
|
5999
6107
|
|
6000
|
-
export interface OmniboxInputStartedEvent extends chrome.events.Event<() => void> {
|
6108
|
+
export interface OmniboxInputStartedEvent extends chrome.events.Event<() => void> {}
|
6001
6109
|
|
6002
|
-
export interface OmniboxInputCancelledEvent extends chrome.events.Event<() => void> {
|
6110
|
+
export interface OmniboxInputCancelledEvent extends chrome.events.Event<() => void> {}
|
6003
6111
|
|
6004
|
-
export interface OmniboxSuggestionDeletedEvent extends chrome.events.Event<(text: string) => void> {
|
6112
|
+
export interface OmniboxSuggestionDeletedEvent extends chrome.events.Event<(text: string) => void> {}
|
6005
6113
|
|
6006
6114
|
/**
|
6007
6115
|
* Sets the description and styling for the default suggestion. The default suggestion is the text that is displayed in the first suggestion row underneath the URL bar.
|
@@ -6033,7 +6141,7 @@ declare namespace chrome.omnibox {
|
|
6033
6141
|
* @since Chrome 5.
|
6034
6142
|
*/
|
6035
6143
|
declare namespace chrome.pageAction {
|
6036
|
-
export interface PageActionClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {
|
6144
|
+
export interface PageActionClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {}
|
6037
6145
|
|
6038
6146
|
export interface TitleDetails {
|
6039
6147
|
/** The id of the tab for which you want to modify the page action. */
|
@@ -6362,18 +6470,22 @@ declare namespace chrome.printerProvider {
|
|
6362
6470
|
}
|
6363
6471
|
|
6364
6472
|
export interface PrinterRequestedEvent
|
6365
|
-
extends chrome.events.Event<(resultCallback: (printerInfo: PrinterInfo[]) => void) => void>
|
6473
|
+
extends chrome.events.Event<(resultCallback: (printerInfo: PrinterInfo[]) => void) => void>
|
6474
|
+
{}
|
6366
6475
|
|
6367
6476
|
export interface PrinterInfoRequestedEvent
|
6368
|
-
extends chrome.events.Event<(device: any, resultCallback: (printerInfo?: PrinterInfo) => void) => void>
|
6477
|
+
extends chrome.events.Event<(device: any, resultCallback: (printerInfo?: PrinterInfo) => void) => void>
|
6478
|
+
{}
|
6369
6479
|
|
6370
|
-
export interface CapabilityRequestedEvent
|
6371
|
-
|
6480
|
+
export interface CapabilityRequestedEvent extends
|
6481
|
+
chrome.events.Event<
|
6372
6482
|
(printerId: string, resultCallback: (capabilities: PrinterCapabilities) => void) => void
|
6373
|
-
>
|
6483
|
+
>
|
6484
|
+
{}
|
6374
6485
|
|
6375
6486
|
export interface PrintRequestedEvent
|
6376
|
-
extends chrome.events.Event<(printJob: PrintJob, resultCallback: (result: string) => void) => void>
|
6487
|
+
extends chrome.events.Event<(printJob: PrintJob, resultCallback: (result: string) => void) => void>
|
6488
|
+
{}
|
6377
6489
|
|
6378
6490
|
/** Event fired when print manager requests printers provided by extensions. */
|
6379
6491
|
export var onGetPrintersRequested: PrinterRequestedEvent;
|
@@ -6519,7 +6631,7 @@ declare namespace chrome.proxy {
|
|
6519
6631
|
fatal: boolean;
|
6520
6632
|
}
|
6521
6633
|
|
6522
|
-
export interface ProxyErrorEvent extends chrome.events.Event<(details: ErrorDetails) => void> {
|
6634
|
+
export interface ProxyErrorEvent extends chrome.events.Event<(details: ErrorDetails) => void> {}
|
6523
6635
|
|
6524
6636
|
export var settings: chrome.types.ChromeSetting;
|
6525
6637
|
/** Notifies about proxy errors. */
|
@@ -6535,7 +6647,7 @@ declare namespace chrome.proxy {
|
|
6535
6647
|
*/
|
6536
6648
|
|
6537
6649
|
declare namespace chrome.search {
|
6538
|
-
export type Disposition =
|
6650
|
+
export type Disposition = "CURRENT_TAB" | "NEW_TAB" | "NEW_WINDOW";
|
6539
6651
|
|
6540
6652
|
export interface QueryInfo {
|
6541
6653
|
/** Location where search results should be displayed. CURRENT_TAB is the default. */
|
@@ -6571,17 +6683,17 @@ declare namespace chrome.search {
|
|
6571
6683
|
*/
|
6572
6684
|
declare namespace chrome.serial {
|
6573
6685
|
export const DataBits: {
|
6574
|
-
SEVEN:
|
6575
|
-
EIGHT:
|
6686
|
+
SEVEN: "seven";
|
6687
|
+
EIGHT: "eight";
|
6576
6688
|
};
|
6577
6689
|
export const ParityBit: {
|
6578
|
-
NO:
|
6579
|
-
ODD:
|
6580
|
-
EVEN:
|
6690
|
+
NO: "no";
|
6691
|
+
ODD: "odd";
|
6692
|
+
EVEN: "even";
|
6581
6693
|
};
|
6582
6694
|
export const StopBits: {
|
6583
|
-
ONE:
|
6584
|
-
TWO:
|
6695
|
+
ONE: "one";
|
6696
|
+
TWO: "two";
|
6585
6697
|
};
|
6586
6698
|
|
6587
6699
|
export interface DeviceInfo {
|
@@ -6784,23 +6896,23 @@ declare namespace chrome.serial.onReceive {
|
|
6784
6896
|
declare namespace chrome.serial.onReceiveError {
|
6785
6897
|
export const OnReceiveErrorEnum: {
|
6786
6898
|
/* The connection was disconnected. */
|
6787
|
-
disconnected:
|
6899
|
+
disconnected: "disconnected";
|
6788
6900
|
/* No data has been received for receiveTimeout milliseconds. */
|
6789
|
-
timeout:
|
6901
|
+
timeout: "timeout";
|
6790
6902
|
/* The device was most likely disconnected from the host. */
|
6791
|
-
device_lost:
|
6903
|
+
device_lost: "device_lost";
|
6792
6904
|
/* The device detected a break condition. */
|
6793
|
-
break:
|
6905
|
+
break: "break";
|
6794
6906
|
/* The device detected a framing error. */
|
6795
|
-
frame_error:
|
6907
|
+
frame_error: "frame_error";
|
6796
6908
|
/* A character-buffer overrun has occurred. The next character is lost. */
|
6797
|
-
overrun:
|
6909
|
+
overrun: "overrun";
|
6798
6910
|
/* An input buffer overflow has occurred. There is either no room in the input buffer, or a character was received after the end-of-file (EOF) character. */
|
6799
|
-
buffer_overflow:
|
6911
|
+
buffer_overflow: "buffer_overflow";
|
6800
6912
|
/* The device detected a parity error. */
|
6801
|
-
parity_error:
|
6913
|
+
parity_error: "parity_error";
|
6802
6914
|
/* A system error occurred and the connection may be unrecoverable. */
|
6803
|
-
system_error:
|
6915
|
+
system_error: "system_error";
|
6804
6916
|
};
|
6805
6917
|
|
6806
6918
|
export interface OnReceiveErrorInfo {
|
@@ -6819,8 +6931,8 @@ declare namespace chrome.serial.onReceiveError {
|
|
6819
6931
|
export function addListener(callback: (info: OnReceiveErrorInfo) => void): void;
|
6820
6932
|
}
|
6821
6933
|
|
6822
|
-
type DocumentLifecycle =
|
6823
|
-
type FrameType =
|
6934
|
+
type DocumentLifecycle = "prerender" | "active" | "cached" | "pending_deletion";
|
6935
|
+
type FrameType = "outermost_frame" | "fenced_frame" | "sub_frame";
|
6824
6936
|
|
6825
6937
|
////////////////////
|
6826
6938
|
// Runtime
|
@@ -6836,17 +6948,17 @@ declare namespace chrome.runtime {
|
|
6836
6948
|
export var id: string;
|
6837
6949
|
|
6838
6950
|
/** https://developer.chrome.com/docs/extensions/reference/runtime/#type-PlatformOs */
|
6839
|
-
export type PlatformOs =
|
6951
|
+
export type PlatformOs = "mac" | "win" | "android" | "cros" | "linux" | "openbsd";
|
6840
6952
|
/** https://developer.chrome.com/docs/extensions/reference/runtime/#type-PlatformArch */
|
6841
|
-
export type PlatformArch =
|
6953
|
+
export type PlatformArch = "arm" | "arm64" | "x86-32" | "x86-64" | "mips" | "mips64";
|
6842
6954
|
/** https://developer.chrome.com/docs/extensions/reference/runtime/#type-PlatformNaclArch */
|
6843
|
-
export type PlatformNaclArch =
|
6955
|
+
export type PlatformNaclArch = "arm" | "x86-32" | "x86-64" | "mips" | "mips64";
|
6844
6956
|
/** https://developer.chrome.com/docs/extensions/reference/runtime/#type-OnInstalledReason */
|
6845
6957
|
export enum OnInstalledReason {
|
6846
|
-
INSTALL =
|
6847
|
-
UPDATE =
|
6848
|
-
CHROME_UPDATE =
|
6849
|
-
SHARED_MODULE_UPDATE =
|
6958
|
+
INSTALL = "install",
|
6959
|
+
UPDATE = "update",
|
6960
|
+
CHROME_UPDATE = "chrome_update",
|
6961
|
+
SHARED_MODULE_UPDATE = "shared_module_update",
|
6850
6962
|
}
|
6851
6963
|
|
6852
6964
|
export interface LastError {
|
@@ -6976,35 +7088,37 @@ declare namespace chrome.runtime {
|
|
6976
7088
|
}
|
6977
7089
|
|
6978
7090
|
/** Result of the update check. */
|
6979
|
-
export type RequestUpdateCheckStatus =
|
7091
|
+
export type RequestUpdateCheckStatus = "throttled" | "no_update" | "update_available";
|
6980
7092
|
|
6981
7093
|
/** Result of the update check. */
|
6982
7094
|
export interface RequestUpdateCheckResult {
|
6983
|
-
|
6984
|
-
|
6985
|
-
|
6986
|
-
|
7095
|
+
/** The status of the update check. */
|
7096
|
+
status: RequestUpdateCheckStatus;
|
7097
|
+
/** The version of the available update. */
|
7098
|
+
version: string;
|
6987
7099
|
}
|
6988
7100
|
|
6989
|
-
export interface PortDisconnectEvent extends chrome.events.Event<(port: Port) => void> {
|
7101
|
+
export interface PortDisconnectEvent extends chrome.events.Event<(port: Port) => void> {}
|
6990
7102
|
|
6991
|
-
export interface PortMessageEvent extends chrome.events.Event<(message: any, port: Port) => void> {
|
7103
|
+
export interface PortMessageEvent extends chrome.events.Event<(message: any, port: Port) => void> {}
|
6992
7104
|
|
6993
|
-
export interface ExtensionMessageEvent
|
6994
|
-
|
7105
|
+
export interface ExtensionMessageEvent extends
|
7106
|
+
chrome.events.Event<
|
6995
7107
|
(message: any, sender: MessageSender, sendResponse: (response?: any) => void) => void
|
6996
|
-
>
|
7108
|
+
>
|
7109
|
+
{}
|
6997
7110
|
|
6998
|
-
export interface ExtensionConnectEvent extends chrome.events.Event<(port: Port) => void> {
|
7111
|
+
export interface ExtensionConnectEvent extends chrome.events.Event<(port: Port) => void> {}
|
6999
7112
|
|
7000
|
-
export interface RuntimeInstalledEvent extends chrome.events.Event<(details: InstalledDetails) => void> {
|
7113
|
+
export interface RuntimeInstalledEvent extends chrome.events.Event<(details: InstalledDetails) => void> {}
|
7001
7114
|
|
7002
|
-
export interface RuntimeEvent extends chrome.events.Event<() => void> {
|
7115
|
+
export interface RuntimeEvent extends chrome.events.Event<() => void> {}
|
7003
7116
|
|
7004
|
-
export interface RuntimeRestartRequiredEvent extends chrome.events.Event<(reason: string) => void> {
|
7117
|
+
export interface RuntimeRestartRequiredEvent extends chrome.events.Event<(reason: string) => void> {}
|
7005
7118
|
|
7006
7119
|
export interface RuntimeUpdateAvailableEvent
|
7007
|
-
extends chrome.events.Event<(details: UpdateAvailableDetails) => void>
|
7120
|
+
extends chrome.events.Event<(details: UpdateAvailableDetails) => void>
|
7121
|
+
{}
|
7008
7122
|
|
7009
7123
|
export interface ManifestIcons {
|
7010
7124
|
[size: number]: string;
|
@@ -7018,79 +7132,79 @@ declare namespace chrome.runtime {
|
|
7018
7132
|
|
7019
7133
|
// Source: https://developer.chrome.com/docs/extensions/mv3/declare_permissions/
|
7020
7134
|
export type ManifestPermissions =
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7135
|
+
| "activeTab"
|
7136
|
+
| "alarms"
|
7137
|
+
| "background"
|
7138
|
+
| "bookmarks"
|
7139
|
+
| "browsingData"
|
7140
|
+
| "certificateProvider"
|
7141
|
+
| "clipboardRead"
|
7142
|
+
| "clipboardWrite"
|
7143
|
+
| "contentSettings"
|
7144
|
+
| "contextMenus"
|
7145
|
+
| "cookies"
|
7146
|
+
| "debugger"
|
7147
|
+
| "declarativeContent"
|
7148
|
+
| "declarativeNetRequest"
|
7149
|
+
| "declarativeNetRequestFeedback"
|
7150
|
+
| "declarativeNetRequestWithHostAccess"
|
7151
|
+
| "declarativeWebRequest"
|
7152
|
+
| "desktopCapture"
|
7153
|
+
| "documentScan"
|
7154
|
+
| "downloads"
|
7155
|
+
| "downloads.shelf"
|
7156
|
+
| "downloads.ui"
|
7157
|
+
| "enterprise.deviceAttributes"
|
7158
|
+
| "enterprise.hardwarePlatform"
|
7159
|
+
| "enterprise.networkingAttributes"
|
7160
|
+
| "enterprise.platformKeys"
|
7161
|
+
| "experimental"
|
7162
|
+
| "favicon"
|
7163
|
+
| "fileBrowserHandler"
|
7164
|
+
| "fileSystemProvider"
|
7165
|
+
| "fontSettings"
|
7166
|
+
| "gcm"
|
7167
|
+
| "geolocation"
|
7168
|
+
| "history"
|
7169
|
+
| "identity"
|
7170
|
+
| "identity.email"
|
7171
|
+
| "idle"
|
7172
|
+
| "loginState"
|
7173
|
+
| "management"
|
7174
|
+
| "nativeMessaging"
|
7175
|
+
| "notifications"
|
7176
|
+
| "offscreen"
|
7177
|
+
| "pageCapture"
|
7178
|
+
| "platformKeys"
|
7179
|
+
| "power"
|
7180
|
+
| "printerProvider"
|
7181
|
+
| "printing"
|
7182
|
+
| "printingMetrics"
|
7183
|
+
| "privacy"
|
7184
|
+
| "processes"
|
7185
|
+
| "proxy"
|
7186
|
+
| "scripting"
|
7187
|
+
| "search"
|
7188
|
+
| "sessions"
|
7189
|
+
| "sidePanel"
|
7190
|
+
| "signedInDevices"
|
7191
|
+
| "storage"
|
7192
|
+
| "system.cpu"
|
7193
|
+
| "system.display"
|
7194
|
+
| "system.memory"
|
7195
|
+
| "system.storage"
|
7196
|
+
| "tabCapture"
|
7197
|
+
| "tabGroups"
|
7198
|
+
| "tabs"
|
7199
|
+
| "topSites"
|
7200
|
+
| "tts"
|
7201
|
+
| "ttsEngine"
|
7202
|
+
| "unlimitedStorage"
|
7203
|
+
| "vpnProvider"
|
7204
|
+
| "wallpaper"
|
7205
|
+
| "webNavigation"
|
7206
|
+
| "webRequest"
|
7207
|
+
| "webRequestBlocking";
|
7094
7208
|
|
7095
7209
|
export interface SearchProvider {
|
7096
7210
|
name?: string | undefined;
|
@@ -7240,7 +7354,7 @@ declare namespace chrome.runtime {
|
|
7240
7354
|
path: string;
|
7241
7355
|
}[] | undefined;
|
7242
7356
|
requirements?: {
|
7243
|
-
|
7357
|
+
"3D"?: {
|
7244
7358
|
features?: string[] | undefined;
|
7245
7359
|
} | undefined;
|
7246
7360
|
plugins?: {
|
@@ -7284,12 +7398,12 @@ declare namespace chrome.runtime {
|
|
7284
7398
|
|
7285
7399
|
// Optional
|
7286
7400
|
background?:
|
7287
|
-
|
7288
|
-
|
7289
|
-
|
7290
|
-
|
7291
|
-
|
7292
|
-
|
7401
|
+
| {
|
7402
|
+
scripts?: string[] | undefined;
|
7403
|
+
page?: string | undefined;
|
7404
|
+
persistent?: boolean | undefined;
|
7405
|
+
}
|
7406
|
+
| undefined;
|
7293
7407
|
content_security_policy?: string | undefined;
|
7294
7408
|
optional_permissions?: string[] | undefined;
|
7295
7409
|
permissions?: string[] | undefined;
|
@@ -7303,11 +7417,11 @@ declare namespace chrome.runtime {
|
|
7303
7417
|
// Optional
|
7304
7418
|
action?: ManifestAction | undefined;
|
7305
7419
|
background?:
|
7306
|
-
|
7307
|
-
|
7308
|
-
|
7309
|
-
|
7310
|
-
|
7420
|
+
| {
|
7421
|
+
service_worker: string;
|
7422
|
+
type?: "module"; // If the service worker uses ES modules
|
7423
|
+
}
|
7424
|
+
| undefined;
|
7311
7425
|
content_scripts?: {
|
7312
7426
|
matches?: string[] | undefined;
|
7313
7427
|
exclude_matches?: string[] | undefined;
|
@@ -7318,7 +7432,7 @@ declare namespace chrome.runtime {
|
|
7318
7432
|
match_about_blank?: boolean | undefined;
|
7319
7433
|
include_globs?: string[] | undefined;
|
7320
7434
|
exclude_globs?: string[] | undefined;
|
7321
|
-
world?: "ISOLATED" | "MAIN" | undefined
|
7435
|
+
world?: "ISOLATED" | "MAIN" | undefined;
|
7322
7436
|
}[] | undefined;
|
7323
7437
|
content_security_policy?: {
|
7324
7438
|
extension_pages?: string;
|
@@ -7330,7 +7444,7 @@ declare namespace chrome.runtime {
|
|
7330
7444
|
web_accessible_resources?: { resources: string[]; matches: string[] }[] | undefined;
|
7331
7445
|
}
|
7332
7446
|
|
7333
|
-
export type Manifest = ManifestV2 | ManifestV3
|
7447
|
+
export type Manifest = ManifestV2 | ManifestV3;
|
7334
7448
|
|
7335
7449
|
/**
|
7336
7450
|
* Attempts to connect to connect listeners within an extension/app (such as the background page), or other extensions/apps. This is useful for content scripts connecting to their extension processes, inter-app/extension communication, and web messaging. Note that this does not connect to any listeners in a content script. Extensions may connect to content scripts embedded in tabs via tabs.connect.
|
@@ -7438,7 +7552,11 @@ declare namespace chrome.runtime {
|
|
7438
7552
|
* @param extensionId The ID of the extension/app to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for web messaging.
|
7439
7553
|
* Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
|
7440
7554
|
*/
|
7441
|
-
export function sendMessage<M = any, R = any>(
|
7555
|
+
export function sendMessage<M = any, R = any>(
|
7556
|
+
extensionId: string | undefined | null,
|
7557
|
+
message: M,
|
7558
|
+
responseCallback: (response: R) => void,
|
7559
|
+
): void;
|
7442
7560
|
/**
|
7443
7561
|
* Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage.
|
7444
7562
|
* @since Chrome 32.
|
@@ -7575,12 +7693,11 @@ declare namespace chrome.runtime {
|
|
7575
7693
|
* @since Chrome 88.
|
7576
7694
|
*/
|
7577
7695
|
declare namespace chrome.scripting {
|
7578
|
-
|
7579
7696
|
/* The CSS style origin for a style change. */
|
7580
|
-
export type StyleOrigin =
|
7697
|
+
export type StyleOrigin = "AUTHOR" | "USER";
|
7581
7698
|
|
7582
7699
|
/* The JavaScript world for a script to execute within. */
|
7583
|
-
export type ExecutionWorld =
|
7700
|
+
export type ExecutionWorld = "ISOLATED" | "MAIN";
|
7584
7701
|
|
7585
7702
|
export interface InjectionResult<T> {
|
7586
7703
|
/* The frame associated with the injection. */
|
@@ -7609,25 +7726,30 @@ declare namespace chrome.scripting {
|
|
7609
7726
|
target: InjectionTarget;
|
7610
7727
|
}
|
7611
7728
|
|
7612
|
-
export type ScriptInjection<Args extends any[], Result> =
|
7613
|
-
|
7614
|
-
|
7615
|
-
|
7616
|
-
|
7617
|
-
|
7618
|
-
|
7619
|
-
|
7620
|
-
|
7621
|
-
|
7622
|
-
|
7623
|
-
|
7624
|
-
|
7625
|
-
|
7626
|
-
|
7627
|
-
|
7628
|
-
|
7629
|
-
|
7630
|
-
|
7729
|
+
export type ScriptInjection<Args extends any[], Result> =
|
7730
|
+
& {
|
7731
|
+
/* Details specifying the target into which to inject the script. */
|
7732
|
+
target: InjectionTarget;
|
7733
|
+
/* The JavaScript world for a script to execute within. */
|
7734
|
+
world?: ExecutionWorld;
|
7735
|
+
/* Whether the injection should be triggered in the target as soon as possible. Note that this is not a guarantee that injection will occur prior to page load, as the page may have already loaded by the time the script reaches the target. */
|
7736
|
+
injectImmediately?: boolean;
|
7737
|
+
}
|
7738
|
+
& (
|
7739
|
+
| {
|
7740
|
+
/* The path of the JS files to inject, relative to the extension's root directory. NOTE: Currently a maximum of one file is supported. Exactly one of files and function must be specified. */
|
7741
|
+
files: string[];
|
7742
|
+
}
|
7743
|
+
| ({
|
7744
|
+
/* A JavaScript function to inject. This function will be serialized, and then deserialized for injection. This means that any bound parameters and execution context will be lost. Exactly one of files and function must be specified. */
|
7745
|
+
func: () => Result;
|
7746
|
+
} | {
|
7747
|
+
/* A JavaScript function to inject. This function will be serialized, and then deserialized for injection. This means that any bound parameters and execution context will be lost. Exactly one of files and function must be specified. */
|
7748
|
+
func: (...args: Args) => Result;
|
7749
|
+
/* The arguments to carry into a provided function. This is only valid if the func parameter is specified. These arguments must be JSON-serializable. */
|
7750
|
+
args: Args;
|
7751
|
+
})
|
7752
|
+
);
|
7631
7753
|
|
7632
7754
|
type Awaited<T> = T extends PromiseLike<infer U> ? U : T;
|
7633
7755
|
|
@@ -7658,7 +7780,9 @@ declare namespace chrome.scripting {
|
|
7658
7780
|
* The details of the script which to inject.
|
7659
7781
|
* @return The `executeScript` method provides its result via callback or returned as a `Promise` (MV3 only). The resulting array contains the result of execution for each frame where the injection succeeded.
|
7660
7782
|
*/
|
7661
|
-
export function executeScript<Args extends any[], Result>(
|
7783
|
+
export function executeScript<Args extends any[], Result>(
|
7784
|
+
injection: ScriptInjection<Args, Result>,
|
7785
|
+
): Promise<InjectionResult<Awaited<Result>>[]>;
|
7662
7786
|
|
7663
7787
|
/**
|
7664
7788
|
* Injects a script into a target context. The script will be run at document_end.
|
@@ -7667,7 +7791,10 @@ declare namespace chrome.scripting {
|
|
7667
7791
|
* @param callback
|
7668
7792
|
* Invoked upon completion of the injection. The resulting array contains the result of execution for each frame where the injection succeeded.
|
7669
7793
|
*/
|
7670
|
-
export function executeScript<Args extends any[], Result>(
|
7794
|
+
export function executeScript<Args extends any[], Result>(
|
7795
|
+
injection: ScriptInjection<Args, Result>,
|
7796
|
+
callback: (results: InjectionResult<Awaited<Result>>[]) => void,
|
7797
|
+
): void;
|
7671
7798
|
|
7672
7799
|
/**
|
7673
7800
|
* Inserts a CSS stylesheet into a target context. If multiple frames are specified, unsuccessful injections are ignored.
|
@@ -7751,7 +7878,10 @@ declare namespace chrome.scripting {
|
|
7751
7878
|
* @param callback
|
7752
7879
|
*/
|
7753
7880
|
export function getRegisteredContentScripts(callback: (scripts: RegisteredContentScript[]) => void): void;
|
7754
|
-
export function getRegisteredContentScripts(
|
7881
|
+
export function getRegisteredContentScripts(
|
7882
|
+
filter: ContentScriptFilter,
|
7883
|
+
callback: (scripts: RegisteredContentScript[]) => void,
|
7884
|
+
): void;
|
7755
7885
|
|
7756
7886
|
/**
|
7757
7887
|
* Updates one or more content scripts.
|
@@ -7784,7 +7914,7 @@ declare namespace chrome.scriptBadge {
|
|
7784
7914
|
popup: string;
|
7785
7915
|
}
|
7786
7916
|
|
7787
|
-
export interface ScriptBadgeClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {
|
7917
|
+
export interface ScriptBadgeClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {}
|
7788
7918
|
|
7789
7919
|
export function getPopup(details: GetPopupDetails, callback: Function): void;
|
7790
7920
|
export function getAttention(details: AttentionDetails): void;
|
@@ -7832,16 +7962,16 @@ declare namespace chrome.sessions {
|
|
7832
7962
|
sessions: Session[];
|
7833
7963
|
}
|
7834
7964
|
|
7835
|
-
export interface SessionChangedEvent extends chrome.events.Event<() => void> {
|
7965
|
+
export interface SessionChangedEvent extends chrome.events.Event<() => void> {}
|
7836
7966
|
|
7837
7967
|
/** The maximum number of sessions.Session that will be included in a requested list. */
|
7838
7968
|
export var MAX_SESSION_RESULTS: number;
|
7839
7969
|
|
7840
7970
|
/**
|
7841
|
-
|
7842
|
-
|
7843
|
-
|
7844
|
-
|
7971
|
+
* Gets the list of recently closed tabs and/or windows.
|
7972
|
+
* @return The `getRecentlyClosed` method provides its result via callback or returned as a `Promise` (MV3 only).
|
7973
|
+
*/
|
7974
|
+
export function getRecentlyClosed(filter?: Filter): Promise<Session[]>;
|
7845
7975
|
/**
|
7846
7976
|
* Gets the list of recently closed tabs and/or windows.
|
7847
7977
|
* @param callback
|
@@ -7991,7 +8121,10 @@ declare namespace chrome.storage {
|
|
7991
8121
|
* @param callback Callback with storage items, or on failure (in which case runtime.lastError will be set).
|
7992
8122
|
* Parameter items: Object with items in their key-value mappings.
|
7993
8123
|
*/
|
7994
|
-
get(
|
8124
|
+
get(
|
8125
|
+
keys: string | string[] | { [key: string]: any } | null,
|
8126
|
+
callback: (items: { [key: string]: any }) => void,
|
8127
|
+
): void;
|
7995
8128
|
/**
|
7996
8129
|
* Sets the desired access level for the storage area. The default will be only trusted contexts.
|
7997
8130
|
* @param accessOptions An object containing an accessLevel key which contains the access level of the storage area.
|
@@ -8056,18 +8189,20 @@ declare namespace chrome.storage {
|
|
8056
8189
|
}
|
8057
8190
|
|
8058
8191
|
export interface StorageAreaChangedEvent
|
8059
|
-
extends chrome.events.Event<(changes: { [key: string]: StorageChange }) => void>
|
8192
|
+
extends chrome.events.Event<(changes: { [key: string]: StorageChange }) => void>
|
8193
|
+
{}
|
8060
8194
|
|
8061
|
-
type AreaName = keyof Pick<typeof chrome.storage,
|
8195
|
+
type AreaName = keyof Pick<typeof chrome.storage, "sync" | "local" | "managed" | "session">;
|
8062
8196
|
export interface StorageChangedEvent
|
8063
|
-
extends chrome.events.Event<(changes: { [key: string]: StorageChange }, areaName: AreaName) => void>
|
8197
|
+
extends chrome.events.Event<(changes: { [key: string]: StorageChange }, areaName: AreaName) => void>
|
8198
|
+
{}
|
8064
8199
|
|
8065
8200
|
type AccessLevel = keyof typeof AccessLevel;
|
8066
8201
|
|
8067
8202
|
/** The storage area's access level. */
|
8068
8203
|
export var AccessLevel: {
|
8069
|
-
TRUSTED_AND_UNTRUSTED_CONTEXTS:
|
8070
|
-
TRUSTED_CONTEXTS:
|
8204
|
+
TRUSTED_AND_UNTRUSTED_CONTEXTS: "TRUSTED_AND_UNTRUSTED_CONTEXTS";
|
8205
|
+
TRUSTED_CONTEXTS: "TRUSTED_CONTEXTS";
|
8071
8206
|
};
|
8072
8207
|
|
8073
8208
|
/** Items in the local storage area are local to each machine. */
|
@@ -8281,9 +8416,9 @@ declare namespace chrome.system.storage {
|
|
8281
8416
|
availableCapacity: number;
|
8282
8417
|
}
|
8283
8418
|
|
8284
|
-
export interface SystemStorageAttachedEvent extends chrome.events.Event<(info: StorageUnitInfo) => void> {
|
8419
|
+
export interface SystemStorageAttachedEvent extends chrome.events.Event<(info: StorageUnitInfo) => void> {}
|
8285
8420
|
|
8286
|
-
export interface SystemStorageDetachedEvent extends chrome.events.Event<(id: string) => void> {
|
8421
|
+
export interface SystemStorageDetachedEvent extends chrome.events.Event<(id: string) => void> {}
|
8287
8422
|
|
8288
8423
|
/** Get the storage information from the system. The argument passed to the callback is an array of StorageUnitInfo objects. */
|
8289
8424
|
export function getInfo(callback: (info: StorageUnitInfo[]) => void): void;
|
@@ -8333,15 +8468,15 @@ declare namespace chrome.system.storage {
|
|
8333
8468
|
*/
|
8334
8469
|
declare namespace chrome.system.display {
|
8335
8470
|
export const DisplayPosition: {
|
8336
|
-
TOP:
|
8337
|
-
RIGHT:
|
8338
|
-
BOTTOM:
|
8339
|
-
LEFT:
|
8471
|
+
TOP: "top";
|
8472
|
+
RIGHT: "right";
|
8473
|
+
BOTTOM: "bottom";
|
8474
|
+
LEFT: "left";
|
8340
8475
|
};
|
8341
8476
|
export const MirrorMode: {
|
8342
|
-
OFF:
|
8343
|
-
NORMAL:
|
8344
|
-
MIXED:
|
8477
|
+
OFF: "off";
|
8478
|
+
NORMAL: "normal";
|
8479
|
+
MIXED: "mixed";
|
8345
8480
|
};
|
8346
8481
|
export interface Bounds {
|
8347
8482
|
/** The x-coordinate of the upper-left corner. */
|
@@ -8404,7 +8539,7 @@ declare namespace chrome.system.display {
|
|
8404
8539
|
/**
|
8405
8540
|
* @deprecated Deprecated since Chrome 70. Use `displayZoomFactor`
|
8406
8541
|
* @description The display mode UI scale factor.
|
8407
|
-
|
8542
|
+
*/
|
8408
8543
|
uiScale: number;
|
8409
8544
|
|
8410
8545
|
/** The display mode device scale factor. */
|
@@ -8640,10 +8775,10 @@ declare namespace chrome.system.display {
|
|
8640
8775
|
* **mixed**
|
8641
8776
|
* The specified source display will be mirrored to the provided destination displays. All other connected displays will be extended.
|
8642
8777
|
*/
|
8643
|
-
mode?:
|
8778
|
+
mode?: "off" | "normal" | "mixed" | undefined;
|
8644
8779
|
}
|
8645
8780
|
export interface MirrorModeInfoMixed extends MirrorModeInfo {
|
8646
|
-
mode:
|
8781
|
+
mode: "mixed";
|
8647
8782
|
mirroringSourceId?: string | undefined;
|
8648
8783
|
/** The ids of the mirroring destination displays. */
|
8649
8784
|
mirroringDestinationIds?: string[] | undefined;
|
@@ -8906,7 +9041,7 @@ declare namespace chrome.tabCapture {
|
|
8906
9041
|
targetTabId?: number | undefined;
|
8907
9042
|
}
|
8908
9043
|
|
8909
|
-
export interface CaptureStatusChangedEvent extends chrome.events.Event<(info: CaptureInfo) => void> {
|
9044
|
+
export interface CaptureStatusChangedEvent extends chrome.events.Event<(info: CaptureInfo) => void> {}
|
8910
9045
|
|
8911
9046
|
/**
|
8912
9047
|
* Captures the visible area of the currently active tab. Capture can only be started on the currently active tab after the extension has been invoked. Capture is maintained across page navigations within the tab, and stops when the tab is closed, or the media stream is closed by the extension.
|
@@ -9265,8 +9400,8 @@ declare namespace chrome.tabs {
|
|
9265
9400
|
/** Optional. Configurations for creating a group. Cannot be used if groupId is already specified. */
|
9266
9401
|
createProperties?: {
|
9267
9402
|
/** Optional. The window of the new group. Defaults to the current window. */
|
9268
|
-
windowId?: number | undefined
|
9269
|
-
} | undefined
|
9403
|
+
windowId?: number | undefined;
|
9404
|
+
} | undefined;
|
9270
9405
|
/** Optional. The ID of the group to add the tabs to. If not specified, a new group will be created. */
|
9271
9406
|
groupId?: number | undefined;
|
9272
9407
|
/** TOptional. he tab ID or list of tab IDs to add to the specified group. */
|
@@ -9285,7 +9420,7 @@ declare namespace chrome.tabs {
|
|
9285
9420
|
* Optional. Whether the tabs have completed loading.
|
9286
9421
|
* One of: "loading", or "complete"
|
9287
9422
|
*/
|
9288
|
-
status?:
|
9423
|
+
status?: "loading" | "complete" | undefined;
|
9289
9424
|
/**
|
9290
9425
|
* Optional. Whether the tabs are in the last focused window.
|
9291
9426
|
* @since Chrome 19.
|
@@ -9297,7 +9432,7 @@ declare namespace chrome.tabs {
|
|
9297
9432
|
* Optional. The type of window the tabs are in.
|
9298
9433
|
* One of: "normal", "popup", "panel", "app", or "devtools"
|
9299
9434
|
*/
|
9300
|
-
windowType?:
|
9435
|
+
windowType?: "normal" | "popup" | "panel" | "app" | "devtools" | undefined;
|
9301
9436
|
/** Optional. Whether the tabs are active in their windows. */
|
9302
9437
|
active?: boolean | undefined;
|
9303
9438
|
/**
|
@@ -9444,28 +9579,29 @@ declare namespace chrome.tabs {
|
|
9444
9579
|
zoomSettings: ZoomSettings;
|
9445
9580
|
}
|
9446
9581
|
|
9447
|
-
export interface TabHighlightedEvent extends chrome.events.Event<(highlightInfo: TabHighlightInfo) => void> {
|
9582
|
+
export interface TabHighlightedEvent extends chrome.events.Event<(highlightInfo: TabHighlightInfo) => void> {}
|
9448
9583
|
|
9449
|
-
export interface TabRemovedEvent extends chrome.events.Event<(tabId: number, removeInfo: TabRemoveInfo) => void> {
|
9584
|
+
export interface TabRemovedEvent extends chrome.events.Event<(tabId: number, removeInfo: TabRemoveInfo) => void> {}
|
9450
9585
|
|
9451
9586
|
export interface TabUpdatedEvent
|
9452
|
-
extends chrome.events.Event<(tabId: number, changeInfo: TabChangeInfo, tab: Tab) => void>
|
9587
|
+
extends chrome.events.Event<(tabId: number, changeInfo: TabChangeInfo, tab: Tab) => void>
|
9588
|
+
{}
|
9453
9589
|
|
9454
|
-
export interface TabAttachedEvent extends chrome.events.Event<(tabId: number, attachInfo: TabAttachInfo) => void> {
|
9590
|
+
export interface TabAttachedEvent extends chrome.events.Event<(tabId: number, attachInfo: TabAttachInfo) => void> {}
|
9455
9591
|
|
9456
|
-
export interface TabMovedEvent extends chrome.events.Event<(tabId: number, moveInfo: TabMoveInfo) => void> {
|
9592
|
+
export interface TabMovedEvent extends chrome.events.Event<(tabId: number, moveInfo: TabMoveInfo) => void> {}
|
9457
9593
|
|
9458
|
-
export interface TabDetachedEvent extends chrome.events.Event<(tabId: number, detachInfo: TabDetachInfo) => void> {
|
9594
|
+
export interface TabDetachedEvent extends chrome.events.Event<(tabId: number, detachInfo: TabDetachInfo) => void> {}
|
9459
9595
|
|
9460
|
-
export interface TabCreatedEvent extends chrome.events.Event<(tab: Tab) => void> {
|
9596
|
+
export interface TabCreatedEvent extends chrome.events.Event<(tab: Tab) => void> {}
|
9461
9597
|
|
9462
|
-
export interface TabActivatedEvent extends chrome.events.Event<(activeInfo: TabActiveInfo) => void> {
|
9598
|
+
export interface TabActivatedEvent extends chrome.events.Event<(activeInfo: TabActiveInfo) => void> {}
|
9463
9599
|
|
9464
|
-
export interface TabReplacedEvent extends chrome.events.Event<(addedTabId: number, removedTabId: number) => void> {
|
9600
|
+
export interface TabReplacedEvent extends chrome.events.Event<(addedTabId: number, removedTabId: number) => void> {}
|
9465
9601
|
|
9466
|
-
export interface TabSelectedEvent extends chrome.events.Event<(tabId: number, selectInfo: TabWindowInfo) => void> {
|
9602
|
+
export interface TabSelectedEvent extends chrome.events.Event<(tabId: number, selectInfo: TabWindowInfo) => void> {}
|
9467
9603
|
|
9468
|
-
export interface TabZoomChangeEvent extends chrome.events.Event<(ZoomChangeInfo: ZoomChangeInfo) => void> {
|
9604
|
+
export interface TabZoomChangeEvent extends chrome.events.Event<(ZoomChangeInfo: ZoomChangeInfo) => void> {}
|
9469
9605
|
|
9470
9606
|
/**
|
9471
9607
|
* Injects JavaScript code into a page. For details, see the programmatic injection section of the content scripts doc.
|
@@ -9753,7 +9889,11 @@ declare namespace chrome.tabs {
|
|
9753
9889
|
* Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The runtime.onMessage event is fired in each content script running in the specified tab for the current extension.
|
9754
9890
|
* @since Chrome 20.
|
9755
9891
|
*/
|
9756
|
-
export function sendMessage<M = any, R = any>(
|
9892
|
+
export function sendMessage<M = any, R = any>(
|
9893
|
+
tabId: number,
|
9894
|
+
message: M,
|
9895
|
+
responseCallback: (response: R) => void,
|
9896
|
+
): void;
|
9757
9897
|
/**
|
9758
9898
|
* Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The runtime.onMessage event is fired in each content script running in the specified tab for the current extension.
|
9759
9899
|
* @since Chrome 41.
|
@@ -9778,7 +9918,7 @@ declare namespace chrome.tabs {
|
|
9778
9918
|
export function sendMessage<M = any, R = any>(
|
9779
9919
|
tabId: number,
|
9780
9920
|
message: M,
|
9781
|
-
options: MessageSendOptions
|
9921
|
+
options: MessageSendOptions,
|
9782
9922
|
): Promise<R>;
|
9783
9923
|
/**
|
9784
9924
|
* Sends a single request to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The extension.onRequest event is fired in each content script running in the specified tab for the current extension.
|
@@ -9786,7 +9926,11 @@ declare namespace chrome.tabs {
|
|
9786
9926
|
* @param responseCallback Optional.
|
9787
9927
|
* Parameter response: The JSON response object sent by the handler of the request. If an error occurs while connecting to the specified tab, the callback will be called with no arguments and runtime.lastError will be set to the error message.
|
9788
9928
|
*/
|
9789
|
-
export function sendRequest<Request = any, Response = any>(
|
9929
|
+
export function sendRequest<Request = any, Response = any>(
|
9930
|
+
tabId: number,
|
9931
|
+
request: Request,
|
9932
|
+
responseCallback?: (response: Response) => void,
|
9933
|
+
): void;
|
9790
9934
|
/** Connects to the content script(s) in the specified tab. The runtime.onConnect event is fired in each content script running in the specified tab for the current extension. */
|
9791
9935
|
export function connect(tabId: number, connectInfo?: ConnectInfo): runtime.Port;
|
9792
9936
|
/**
|
@@ -10066,7 +10210,7 @@ declare namespace chrome.tabs {
|
|
10066
10210
|
* @param options Configurations object
|
10067
10211
|
* @param callback Optional.
|
10068
10212
|
*/
|
10069
|
-
export function group(options: GroupOptions, callback: (groupId: number) => void): void
|
10213
|
+
export function group(options: GroupOptions, callback: (groupId: number) => void): void;
|
10070
10214
|
/**
|
10071
10215
|
* Removes one or more tabs from their respective groups. If any groups become empty, they are deleted
|
10072
10216
|
* @since Chrome 88
|
@@ -10080,7 +10224,7 @@ declare namespace chrome.tabs {
|
|
10080
10224
|
* @param tabIds The tabs to ungroup.
|
10081
10225
|
* @param callback Optional. Called after the operation is completed.
|
10082
10226
|
*/
|
10083
|
-
export function ungroup(tabIds: number | number[], callback: () => void): void
|
10227
|
+
export function ungroup(tabIds: number | number[], callback: () => void): void;
|
10084
10228
|
/**
|
10085
10229
|
* Fired when the highlighted or selected tabs in a window changes.
|
10086
10230
|
* @since Chrome 18.
|
@@ -10147,11 +10291,10 @@ declare namespace chrome.tabs {
|
|
10147
10291
|
* @since Chrome 89. Manifest V3 and above.
|
10148
10292
|
*/
|
10149
10293
|
declare namespace chrome.tabGroups {
|
10150
|
-
|
10151
10294
|
/** An ID that represents the absence of a group. */
|
10152
10295
|
export var TAB_GROUP_ID_NONE: -1;
|
10153
10296
|
|
10154
|
-
export type ColorEnum =
|
10297
|
+
export type ColorEnum = "grey" | "blue" | "red" | "yellow" | "green" | "pink" | "purple" | "cyan" | "orange";
|
10155
10298
|
|
10156
10299
|
export interface TabGroup {
|
10157
10300
|
/** Whether the group is collapsed. A collapsed group is one whose tabs are hidden. */
|
@@ -10220,7 +10363,7 @@ declare namespace chrome.tabGroups {
|
|
10220
10363
|
* @param groupId The ID of the group to move.
|
10221
10364
|
* @param moveProperties Information on how to move the group.
|
10222
10365
|
* @param callback Optional.
|
10223
|
-
|
10366
|
+
*/
|
10224
10367
|
export function move(groupId: number, moveProperties: MoveProperties, callback: (group: TabGroup) => void): void;
|
10225
10368
|
|
10226
10369
|
/**
|
@@ -10251,12 +10394,16 @@ declare namespace chrome.tabGroups {
|
|
10251
10394
|
* @param updateProperties Information on how to update the group.
|
10252
10395
|
* @param callback Optional.
|
10253
10396
|
*/
|
10254
|
-
export function update(
|
10397
|
+
export function update(
|
10398
|
+
groupId: number,
|
10399
|
+
updateProperties: UpdateProperties,
|
10400
|
+
callback: (group: TabGroup) => void,
|
10401
|
+
): void;
|
10255
10402
|
|
10256
|
-
export interface TabGroupCreatedEvent extends chrome.events.Event<(group: TabGroup) => void> {
|
10257
|
-
export interface TabGroupMovedEvent extends chrome.events.Event<(group: TabGroup) => void> {
|
10258
|
-
export interface TabGroupRemovedEvent extends chrome.events.Event<(group: TabGroup) => void> {
|
10259
|
-
export interface TabGroupUpdated extends chrome.events.Event<(group: TabGroup) => void> {
|
10403
|
+
export interface TabGroupCreatedEvent extends chrome.events.Event<(group: TabGroup) => void> {}
|
10404
|
+
export interface TabGroupMovedEvent extends chrome.events.Event<(group: TabGroup) => void> {}
|
10405
|
+
export interface TabGroupRemovedEvent extends chrome.events.Event<(group: TabGroup) => void> {}
|
10406
|
+
export interface TabGroupUpdated extends chrome.events.Event<(group: TabGroup) => void> {}
|
10260
10407
|
|
10261
10408
|
/** Fired when a group is created. */
|
10262
10409
|
export var onCreated: TabGroupCreatedEvent;
|
@@ -10320,7 +10467,17 @@ declare namespace chrome.tts {
|
|
10320
10467
|
* The type can be 'start' as soon as speech has started, 'word' when a word boundary is reached, 'sentence' when a sentence boundary is reached, 'marker' when an SSML mark element is reached, 'end' when the end of the utterance is reached, 'interrupted' when the utterance is stopped or interrupted before reaching the end, 'cancelled' when it's removed from the queue before ever being synthesized, or 'error' when any other error occurs. When pausing speech, a 'pause' event is fired if a particular utterance is paused in the middle, and 'resume' if an utterance resumes speech. Note that pause and resume events may not fire if speech is paused in-between utterances.
|
10321
10468
|
* One of: "start", "end", "word", "sentence", "marker", "interrupted", "cancelled", "error", "pause", or "resume"
|
10322
10469
|
*/
|
10323
|
-
type:
|
10470
|
+
type:
|
10471
|
+
| "start"
|
10472
|
+
| "end"
|
10473
|
+
| "word"
|
10474
|
+
| "sentence"
|
10475
|
+
| "marker"
|
10476
|
+
| "interrupted"
|
10477
|
+
| "cancelled"
|
10478
|
+
| "error"
|
10479
|
+
| "pause"
|
10480
|
+
| "resume";
|
10324
10481
|
}
|
10325
10482
|
|
10326
10483
|
/** A description of a voice available for speech synthesis. */
|
@@ -10448,10 +10605,11 @@ declare namespace chrome.ttsEngine {
|
|
10448
10605
|
pitch?: number | undefined;
|
10449
10606
|
}
|
10450
10607
|
|
10451
|
-
export interface TtsEngineSpeakEvent
|
10452
|
-
|
10608
|
+
export interface TtsEngineSpeakEvent extends
|
10609
|
+
chrome.events.Event<
|
10453
10610
|
(utterance: string, options: SpeakOptions, sendTtsEvent: (event: chrome.tts.TtsEvent) => void) => void
|
10454
|
-
>
|
10611
|
+
>
|
10612
|
+
{}
|
10455
10613
|
|
10456
10614
|
/** Called when the user makes a call to tts.speak() and one of the voices from this extension's manifest is the first to match the options object. */
|
10457
10615
|
export var onSpeak: TtsEngineSpeakEvent;
|
@@ -10477,7 +10635,7 @@ declare namespace chrome.ttsEngine {
|
|
10477
10635
|
* @since Chrome 13.
|
10478
10636
|
*/
|
10479
10637
|
declare namespace chrome.types {
|
10480
|
-
type settingsScope =
|
10638
|
+
type settingsScope = "regular" | "regular_only" | "incognito_persistent" | "incognito_session_only" | undefined;
|
10481
10639
|
|
10482
10640
|
export interface ChromeSettingClearDetails {
|
10483
10641
|
/**
|
@@ -10526,7 +10684,11 @@ declare namespace chrome.types {
|
|
10526
10684
|
* • controllable_by_this_extension: can be controlled by this extension
|
10527
10685
|
* • controlled_by_this_extension: controlled by this extension
|
10528
10686
|
*/
|
10529
|
-
levelOfControl:
|
10687
|
+
levelOfControl:
|
10688
|
+
| "not_controllable"
|
10689
|
+
| "controlled_by_other_extensions"
|
10690
|
+
| "controllable_by_this_extension"
|
10691
|
+
| "controlled_by_this_extension";
|
10530
10692
|
/** The value of the setting. */
|
10531
10693
|
value: any;
|
10532
10694
|
/**
|
@@ -10537,7 +10699,7 @@ declare namespace chrome.types {
|
|
10537
10699
|
incognitoSpecific?: boolean | undefined;
|
10538
10700
|
}
|
10539
10701
|
|
10540
|
-
export interface ChromeSettingChangedEvent extends chrome.events.Event<DetailsCallback> {
|
10702
|
+
export interface ChromeSettingChangedEvent extends chrome.events.Event<DetailsCallback> {}
|
10541
10703
|
|
10542
10704
|
/** An interface that allows access to a Chrome browser setting. See accessibilityFeatures for an example. */
|
10543
10705
|
export interface ChromeSetting {
|
@@ -10595,16 +10757,18 @@ declare namespace chrome.vpnProvider {
|
|
10595
10757
|
}
|
10596
10758
|
|
10597
10759
|
export interface VpnPlatformMessageEvent
|
10598
|
-
extends chrome.events.Event<(id: string, message: string, error: string) => void>
|
10760
|
+
extends chrome.events.Event<(id: string, message: string, error: string) => void>
|
10761
|
+
{}
|
10599
10762
|
|
10600
|
-
export interface VpnPacketReceptionEvent extends chrome.events.Event<(data: ArrayBuffer) => void> {
|
10763
|
+
export interface VpnPacketReceptionEvent extends chrome.events.Event<(data: ArrayBuffer) => void> {}
|
10601
10764
|
|
10602
|
-
export interface VpnConfigRemovalEvent extends chrome.events.Event<(id: string) => void> {
|
10765
|
+
export interface VpnConfigRemovalEvent extends chrome.events.Event<(id: string) => void> {}
|
10603
10766
|
|
10604
10767
|
export interface VpnConfigCreationEvent
|
10605
|
-
extends chrome.events.Event<(id: string, name: string, data: Object) => void>
|
10768
|
+
extends chrome.events.Event<(id: string, name: string, data: Object) => void>
|
10769
|
+
{}
|
10606
10770
|
|
10607
|
-
export interface VpnUiEvent extends chrome.events.Event<(event: string, id?: string) => void> {
|
10771
|
+
export interface VpnUiEvent extends chrome.events.Event<(event: string, id?: string) => void> {}
|
10608
10772
|
|
10609
10773
|
/**
|
10610
10774
|
* Creates a new VPN configuration that persists across multiple login sessions of the user.
|
@@ -10671,7 +10835,7 @@ declare namespace chrome.wallpaper {
|
|
10671
10835
|
* The supported wallpaper layouts.
|
10672
10836
|
* One of: "STRETCH", "CENTER", or "CENTER_CROPPED"
|
10673
10837
|
*/
|
10674
|
-
layout:
|
10838
|
+
layout: "STRETCH" | "CENTER" | "CENTER_CROPPED";
|
10675
10839
|
/** The file name of the saved wallpaper. */
|
10676
10840
|
filename: string;
|
10677
10841
|
/** Optional. True if a 128x60 thumbnail should be generated. */
|
@@ -10815,24 +10979,28 @@ declare namespace chrome.webNavigation {
|
|
10815
10979
|
}
|
10816
10980
|
|
10817
10981
|
export interface WebNavigationEvent<T extends WebNavigationCallbackDetails>
|
10818
|
-
extends chrome.events.Event<(details: T) => void>
|
10982
|
+
extends chrome.events.Event<(details: T) => void>
|
10983
|
+
{
|
10819
10984
|
addListener(callback: (details: T) => void, filters?: WebNavigationEventFilter): void;
|
10820
10985
|
}
|
10821
10986
|
|
10822
|
-
export interface WebNavigationFramedEvent extends WebNavigationEvent<WebNavigationFramedCallbackDetails> {
|
10987
|
+
export interface WebNavigationFramedEvent extends WebNavigationEvent<WebNavigationFramedCallbackDetails> {}
|
10823
10988
|
|
10824
10989
|
export interface WebNavigationFramedErrorEvent
|
10825
|
-
extends WebNavigationEvent<WebNavigationFramedErrorCallbackDetails>
|
10990
|
+
extends WebNavigationEvent<WebNavigationFramedErrorCallbackDetails>
|
10991
|
+
{}
|
10826
10992
|
|
10827
|
-
export interface WebNavigationSourceEvent extends WebNavigationEvent<WebNavigationSourceCallbackDetails> {
|
10993
|
+
export interface WebNavigationSourceEvent extends WebNavigationEvent<WebNavigationSourceCallbackDetails> {}
|
10828
10994
|
|
10829
|
-
export interface WebNavigationParentedEvent extends WebNavigationEvent<WebNavigationParentedCallbackDetails> {
|
10995
|
+
export interface WebNavigationParentedEvent extends WebNavigationEvent<WebNavigationParentedCallbackDetails> {}
|
10830
10996
|
|
10831
10997
|
export interface WebNavigationTransitionalEvent
|
10832
|
-
extends WebNavigationEvent<WebNavigationTransitionCallbackDetails>
|
10998
|
+
extends WebNavigationEvent<WebNavigationTransitionCallbackDetails>
|
10999
|
+
{}
|
10833
11000
|
|
10834
11001
|
export interface WebNavigationReplacementEvent
|
10835
|
-
extends WebNavigationEvent<WebNavigationReplacementCallbackDetails>
|
11002
|
+
extends WebNavigationEvent<WebNavigationReplacementCallbackDetails>
|
11003
|
+
{}
|
10836
11004
|
|
10837
11005
|
/**
|
10838
11006
|
* Retrieves information about the given frame. A frame refers to an <iframe> or a <frame> of a web page and is identified by a tab ID and a frame ID.
|
@@ -10903,19 +11071,19 @@ declare namespace chrome.webNavigation {
|
|
10903
11071
|
declare namespace chrome.webRequest {
|
10904
11072
|
/** How the requested resource will be used. */
|
10905
11073
|
export type ResourceType =
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
|
|
10913
|
-
|
|
10914
|
-
|
|
10915
|
-
|
|
10916
|
-
|
|
10917
|
-
|
|
10918
|
-
|
|
11074
|
+
| "main_frame"
|
11075
|
+
| "sub_frame"
|
11076
|
+
| "stylesheet"
|
11077
|
+
| "script"
|
11078
|
+
| "image"
|
11079
|
+
| "font"
|
11080
|
+
| "object"
|
11081
|
+
| "xmlhttprequest"
|
11082
|
+
| "ping"
|
11083
|
+
| "csp_report"
|
11084
|
+
| "media"
|
11085
|
+
| "websocket"
|
11086
|
+
| "other";
|
10919
11087
|
|
10920
11088
|
export interface AuthCredentials {
|
10921
11089
|
username: string;
|
@@ -11050,7 +11218,7 @@ declare namespace chrome.webRequest {
|
|
11050
11218
|
requestBody: WebRequestBody | null;
|
11051
11219
|
}
|
11052
11220
|
|
11053
|
-
export interface WebRequestFullDetails extends WebRequestHeadersDetails, WebRequestBodyDetails {
|
11221
|
+
export interface WebRequestFullDetails extends WebRequestHeadersDetails, WebRequestBodyDetails {}
|
11054
11222
|
|
11055
11223
|
export interface WebResponseDetails extends ResourceRequest {
|
11056
11224
|
/** HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., responses that lack a status line). */
|
@@ -11099,8 +11267,11 @@ declare namespace chrome.webRequest {
|
|
11099
11267
|
error: string;
|
11100
11268
|
}
|
11101
11269
|
|
11102
|
-
export interface WebRequestBodyEvent
|
11103
|
-
|
11270
|
+
export interface WebRequestBodyEvent extends
|
11271
|
+
chrome.events.EventWithRequiredFilterInAddListener<
|
11272
|
+
(details: WebRequestBodyDetails) => BlockingResponse | void
|
11273
|
+
>
|
11274
|
+
{
|
11104
11275
|
addListener(
|
11105
11276
|
callback: (details: WebRequestBodyDetails) => BlockingResponse | void,
|
11106
11277
|
filter: RequestFilter,
|
@@ -11108,8 +11279,11 @@ declare namespace chrome.webRequest {
|
|
11108
11279
|
): void;
|
11109
11280
|
}
|
11110
11281
|
|
11111
|
-
export interface WebRequestHeadersSynchronousEvent
|
11112
|
-
|
11282
|
+
export interface WebRequestHeadersSynchronousEvent extends
|
11283
|
+
chrome.events.EventWithRequiredFilterInAddListener<
|
11284
|
+
(details: WebRequestHeadersDetails) => BlockingResponse | void
|
11285
|
+
>
|
11286
|
+
{
|
11113
11287
|
addListener(
|
11114
11288
|
callback: (details: WebRequestHeadersDetails) => BlockingResponse | void,
|
11115
11289
|
filter: RequestFilter,
|
@@ -11118,7 +11292,8 @@ declare namespace chrome.webRequest {
|
|
11118
11292
|
}
|
11119
11293
|
|
11120
11294
|
export interface WebRequestHeadersEvent
|
11121
|
-
extends chrome.events.EventWithRequiredFilterInAddListener<(details: WebRequestHeadersDetails) => void>
|
11295
|
+
extends chrome.events.EventWithRequiredFilterInAddListener<(details: WebRequestHeadersDetails) => void>
|
11296
|
+
{
|
11122
11297
|
addListener(
|
11123
11298
|
callback: (details: WebRequestHeadersDetails) => void,
|
11124
11299
|
filter: RequestFilter,
|
@@ -11127,12 +11302,16 @@ declare namespace chrome.webRequest {
|
|
11127
11302
|
}
|
11128
11303
|
|
11129
11304
|
export interface _WebResponseHeadersEvent<T extends WebResponseHeadersDetails>
|
11130
|
-
extends chrome.events.EventWithRequiredFilterInAddListener<(details: T) => void>
|
11305
|
+
extends chrome.events.EventWithRequiredFilterInAddListener<(details: T) => void>
|
11306
|
+
{
|
11131
11307
|
addListener(callback: (details: T) => void, filter: RequestFilter, opt_extraInfoSpec?: string[]): void;
|
11132
11308
|
}
|
11133
11309
|
|
11134
|
-
export interface WebResponseHeadersEvent
|
11135
|
-
|
11310
|
+
export interface WebResponseHeadersEvent extends
|
11311
|
+
chrome.events.EventWithRequiredFilterInAddListener<
|
11312
|
+
(details: WebResponseHeadersDetails) => BlockingResponse | void
|
11313
|
+
>
|
11314
|
+
{
|
11136
11315
|
addListener(
|
11137
11316
|
callback: (details: WebResponseHeadersDetails) => BlockingResponse | void,
|
11138
11317
|
filter: RequestFilter,
|
@@ -11140,14 +11319,15 @@ declare namespace chrome.webRequest {
|
|
11140
11319
|
): void;
|
11141
11320
|
}
|
11142
11321
|
|
11143
|
-
export interface WebResponseCacheEvent extends _WebResponseHeadersEvent<WebResponseCacheDetails> {
|
11322
|
+
export interface WebResponseCacheEvent extends _WebResponseHeadersEvent<WebResponseCacheDetails> {}
|
11144
11323
|
|
11145
|
-
export interface WebRedirectionResponseEvent extends _WebResponseHeadersEvent<WebRedirectionResponseDetails> {
|
11324
|
+
export interface WebRedirectionResponseEvent extends _WebResponseHeadersEvent<WebRedirectionResponseDetails> {}
|
11146
11325
|
|
11147
|
-
export interface WebAuthenticationChallengeEvent
|
11148
|
-
|
11326
|
+
export interface WebAuthenticationChallengeEvent extends
|
11327
|
+
chrome.events.EventWithRequiredFilterInAddListener<
|
11149
11328
|
(details: WebAuthenticationChallengeDetails, callback?: (response: BlockingResponse) => void) => void
|
11150
|
-
>
|
11329
|
+
>
|
11330
|
+
{
|
11151
11331
|
addListener(
|
11152
11332
|
callback: (
|
11153
11333
|
details: WebAuthenticationChallengeDetails,
|
@@ -11158,7 +11338,7 @@ declare namespace chrome.webRequest {
|
|
11158
11338
|
): void;
|
11159
11339
|
}
|
11160
11340
|
|
11161
|
-
export interface WebResponseErrorEvent extends _WebResponseHeadersEvent<WebResponseErrorDetails> {
|
11341
|
+
export interface WebResponseErrorEvent extends _WebResponseHeadersEvent<WebResponseErrorDetails> {}
|
11162
11342
|
|
11163
11343
|
/**
|
11164
11344
|
* The maximum number of times that handlerBehaviorChanged can be called per 10 minute sustained interval. handlerBehaviorChanged is an expensive function call that shouldn't be called often.
|
@@ -11280,9 +11460,9 @@ declare namespace chrome.webstore {
|
|
11280
11460
|
*/
|
11281
11461
|
export function install(failureCallback?: (error: string, errorCode?: string) => void): void;
|
11282
11462
|
|
11283
|
-
export interface InstallationStageEvent extends chrome.events.Event<(stage: string) => void> {
|
11463
|
+
export interface InstallationStageEvent extends chrome.events.Event<(stage: string) => void> {}
|
11284
11464
|
|
11285
|
-
export interface DownloadProgressEvent extends chrome.events.Event<(percentDownloaded: number) => void> {
|
11465
|
+
export interface DownloadProgressEvent extends chrome.events.Event<(percentDownloaded: number) => void> {}
|
11286
11466
|
|
11287
11467
|
/**
|
11288
11468
|
* Fired when an inline installation enters a new InstallStage. In order to receive notifications about this event, listeners must be registered before the inline installation begins.
|
@@ -11441,16 +11621,14 @@ declare namespace chrome.windows {
|
|
11441
11621
|
windowTypes: windowTypeEnum[];
|
11442
11622
|
}
|
11443
11623
|
|
11444
|
-
export interface WindowIdEvent
|
11445
|
-
extends chrome.events.Event<(windowId: number) => void> {
|
11624
|
+
export interface WindowIdEvent extends chrome.events.Event<(windowId: number) => void> {
|
11446
11625
|
addListener(
|
11447
11626
|
callback: (windowId: number) => void,
|
11448
11627
|
filters?: WindowEventFilter,
|
11449
11628
|
): void;
|
11450
11629
|
}
|
11451
11630
|
|
11452
|
-
export interface WindowReferenceEvent
|
11453
|
-
extends chrome.events.Event<(window: Window) => void> {
|
11631
|
+
export interface WindowReferenceEvent extends chrome.events.Event<(window: Window) => void> {
|
11454
11632
|
addListener(
|
11455
11633
|
callback: (window: Window) => void,
|
11456
11634
|
filters?: WindowEventFilter,
|
@@ -11462,21 +11640,21 @@ declare namespace chrome.windows {
|
|
11462
11640
|
* 'panel' is deprecated and is available only to existing whitelisted extensions on Chrome OS.
|
11463
11641
|
* @since Chrome 44.
|
11464
11642
|
*/
|
11465
|
-
export type createTypeEnum =
|
11643
|
+
export type createTypeEnum = "normal" | "popup" | "panel";
|
11466
11644
|
|
11467
11645
|
/**
|
11468
11646
|
* The state of this browser window.
|
11469
11647
|
* In some circumstances a window may not be assigned a state property; for example, when querying closed windows from the sessions API.
|
11470
11648
|
* @since Chrome 44.
|
11471
11649
|
*/
|
11472
|
-
export type windowStateEnum =
|
11650
|
+
export type windowStateEnum = "normal" | "minimized" | "maximized" | "fullscreen" | "locked-fullscreen";
|
11473
11651
|
|
11474
11652
|
/**
|
11475
11653
|
* The type of browser window this is.
|
11476
11654
|
* In some circumstances a window may not be assigned a type property; for example, when querying closed windows from the sessions API.
|
11477
11655
|
* @since Chrome 44.
|
11478
11656
|
*/
|
11479
|
-
export type windowTypeEnum =
|
11657
|
+
export type windowTypeEnum = "normal" | "popup" | "panel" | "app" | "devtools";
|
11480
11658
|
|
11481
11659
|
/**
|
11482
11660
|
* The windowId value that represents the current window.
|
@@ -11500,7 +11678,11 @@ declare namespace chrome.windows {
|
|
11500
11678
|
* Gets details about a window.
|
11501
11679
|
* @since Chrome 18.
|
11502
11680
|
*/
|
11503
|
-
export function get(
|
11681
|
+
export function get(
|
11682
|
+
windowId: number,
|
11683
|
+
queryOptions: QueryOptions,
|
11684
|
+
callback: (window: chrome.windows.Window) => void,
|
11685
|
+
): void;
|
11504
11686
|
/**
|
11505
11687
|
* Gets details about a window.
|
11506
11688
|
* @since Chrome 18.
|
@@ -11671,7 +11853,7 @@ declare namespace chrome.declarativeNetRequest {
|
|
11671
11853
|
OPTIONS = "options",
|
11672
11854
|
PATCH = "patch",
|
11673
11855
|
POST = "post",
|
11674
|
-
PUT = "put"
|
11856
|
+
PUT = "put",
|
11675
11857
|
}
|
11676
11858
|
|
11677
11859
|
/** This describes the resource type of the network request. */
|
@@ -11688,7 +11870,7 @@ declare namespace chrome.declarativeNetRequest {
|
|
11688
11870
|
CSP_REPORT = "csp_report",
|
11689
11871
|
MEDIA = "media",
|
11690
11872
|
WEBSOCKET = "websocket",
|
11691
|
-
OTHER = "other"
|
11873
|
+
OTHER = "other",
|
11692
11874
|
}
|
11693
11875
|
|
11694
11876
|
/** Describes the kind of action to take if a given RuleCondition matches. */
|
@@ -11698,13 +11880,13 @@ declare namespace chrome.declarativeNetRequest {
|
|
11698
11880
|
ALLOW = "allow",
|
11699
11881
|
UPGRADE_SCHEME = "upgradeScheme",
|
11700
11882
|
MODIFY_HEADERS = "modifyHeaders",
|
11701
|
-
ALLOW_ALL_REQUESTS = "allowAllRequests"
|
11883
|
+
ALLOW_ALL_REQUESTS = "allowAllRequests",
|
11702
11884
|
}
|
11703
11885
|
|
11704
11886
|
/** Describes the reason why a given regular expression isn't supported. */
|
11705
11887
|
export enum UnsupportedRegexReason {
|
11706
11888
|
SYNTAX_ERROR = "syntaxError",
|
11707
|
-
MEMORY_LIMIT_EXCEEDED = "memoryLimitExceeded"
|
11889
|
+
MEMORY_LIMIT_EXCEEDED = "memoryLimitExceeded",
|
11708
11890
|
}
|
11709
11891
|
|
11710
11892
|
/** TThis describes whether the request is first or third party to the frame in which it originated.
|
@@ -11712,14 +11894,14 @@ declare namespace chrome.declarativeNetRequest {
|
|
11712
11894
|
*/
|
11713
11895
|
export enum DomainType {
|
11714
11896
|
FIRST_PARTY = "firstParty",
|
11715
|
-
THIRD_PARTY = "thirdParty"
|
11897
|
+
THIRD_PARTY = "thirdParty",
|
11716
11898
|
}
|
11717
11899
|
|
11718
11900
|
/** This describes the possible operations for a "modifyHeaders" rule. */
|
11719
11901
|
export enum HeaderOperation {
|
11720
11902
|
APPEND = "append",
|
11721
11903
|
SET = "set",
|
11722
|
-
REMOVE = "remove"
|
11904
|
+
REMOVE = "remove",
|
11723
11905
|
}
|
11724
11906
|
|
11725
11907
|
export interface RequestDetails {
|
@@ -12180,7 +12362,7 @@ declare namespace chrome.declarativeNetRequest {
|
|
12180
12362
|
|
12181
12363
|
export interface RulesMatchedDetails {
|
12182
12364
|
/** Rules matching the given filter. */
|
12183
|
-
rulesMatchedInfo: MatchedRuleInfo[]
|
12365
|
+
rulesMatchedInfo: MatchedRuleInfo[];
|
12184
12366
|
}
|
12185
12367
|
|
12186
12368
|
/** Returns the number of static rules an extension can enable before the global static rule limit is reached. */
|
@@ -12226,7 +12408,10 @@ declare namespace chrome.declarativeNetRequest {
|
|
12226
12408
|
* In case of an error, runtime.lastError will be set and no rules will be returned.
|
12227
12409
|
* This can happen for multiple reasons, such as insufficient permissions, or exceeding the quota.
|
12228
12410
|
*/
|
12229
|
-
export function getMatchedRules(
|
12411
|
+
export function getMatchedRules(
|
12412
|
+
filter: MatchedRulesFilter | undefined,
|
12413
|
+
callback: (details: RulesMatchedDetails) => void,
|
12414
|
+
): void;
|
12230
12415
|
|
12231
12416
|
/**
|
12232
12417
|
* Returns all rules matched for the extension.
|
@@ -12262,7 +12447,10 @@ declare namespace chrome.declarativeNetRequest {
|
|
12262
12447
|
* @param callback Called with details consisting of whether the regular expression is supported and the
|
12263
12448
|
* reason if not.
|
12264
12449
|
*/
|
12265
|
-
export function isRegexSupported(
|
12450
|
+
export function isRegexSupported(
|
12451
|
+
regexOptions: RegexOptions,
|
12452
|
+
callback: (result: IsRegexSupportedResult) => void,
|
12453
|
+
): void;
|
12266
12454
|
|
12267
12455
|
/** Checks if the given regular expression will be supported as a regexFilter rule condition.
|
12268
12456
|
*
|
@@ -12332,7 +12520,6 @@ declare namespace chrome.declarativeNetRequest {
|
|
12332
12520
|
*/
|
12333
12521
|
export function updateEnabledRulesets(options: UpdateRulesetOptions): Promise<void>;
|
12334
12522
|
|
12335
|
-
|
12336
12523
|
/** Modifies the current set of session scoped rules for the extension.
|
12337
12524
|
* The rules with IDs listed in options.removeRuleIds are first removed, and then the rules given in options.addRules are added.
|
12338
12525
|
*
|
@@ -12362,7 +12549,7 @@ declare namespace chrome.declarativeNetRequest {
|
|
12362
12549
|
export function updateSessionRules(options: UpdateRuleOptions): Promise<void>;
|
12363
12550
|
|
12364
12551
|
/** The rule that has been matched along with information about the associated request. */
|
12365
|
-
export interface RuleMatchedDebugEvent extends chrome.events.Event<(info: MatchedRuleInfoDebug) => void> {
|
12552
|
+
export interface RuleMatchedDebugEvent extends chrome.events.Event<(info: MatchedRuleInfoDebug) => void> {}
|
12366
12553
|
|
12367
12554
|
/** Fired when a rule is matched with a request.
|
12368
12555
|
* Only available for unpacked extensions with the declarativeNetRequestFeedback permission as this is intended to be used for debugging purposes only. */
|
@@ -12396,7 +12583,10 @@ declare namespace chrome.sidePanel {
|
|
12396
12583
|
default_path: string;
|
12397
12584
|
}
|
12398
12585
|
|
12399
|
-
export function getOptions(
|
12586
|
+
export function getOptions(
|
12587
|
+
options: GetPanelOptions,
|
12588
|
+
callback?: (options: PanelOptions) => void,
|
12589
|
+
): Promise<PanelOptions>;
|
12400
12590
|
|
12401
12591
|
export function getPanelBehavior(callback?: (behavior: PanelBehavior) => void): Promise<PanelBehavior>;
|
12402
12592
|
|