@wxt-dev/browser 0.0.318 → 0.0.320
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/gen/chrome-cast/index.d.ts +25 -25
- package/src/gen/index.d.ts +45 -38
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wxt-dev/browser",
|
|
3
3
|
"description": "Provides a cross-browser API for using extension APIs and types based on @types/chrome",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.320",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.mjs",
|
|
7
7
|
"types": "src/index.d.ts",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"src"
|
|
20
20
|
],
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@types/chrome": "0.0.
|
|
22
|
+
"@types/chrome": "0.0.320",
|
|
23
23
|
"fs-extra": "^11.3.0",
|
|
24
24
|
"nano-spawn": "^0.2.0",
|
|
25
|
-
"tsx": "4.19.
|
|
25
|
+
"tsx": "4.19.4",
|
|
26
26
|
"typescript": "^5.8.3",
|
|
27
27
|
"vitest": "^3.1.2"
|
|
28
28
|
},
|
|
@@ -112,7 +112,7 @@ export namespace Browser {
|
|
|
112
112
|
*/
|
|
113
113
|
export function initialize(
|
|
114
114
|
apiConfig: Browser.cast.ApiConfig,
|
|
115
|
-
successCallback:
|
|
115
|
+
successCallback: () => void,
|
|
116
116
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
117
117
|
): void;
|
|
118
118
|
|
|
@@ -160,7 +160,7 @@ export namespace Browser {
|
|
|
160
160
|
*/
|
|
161
161
|
export function setCustomReceivers(
|
|
162
162
|
receivers: Browser.cast.Receiver[],
|
|
163
|
-
successCallback:
|
|
163
|
+
successCallback: () => void,
|
|
164
164
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
165
165
|
): void;
|
|
166
166
|
|
|
@@ -171,7 +171,7 @@ export namespace Browser {
|
|
|
171
171
|
*/
|
|
172
172
|
export function setReceiverDisplayStatus(
|
|
173
173
|
receiver: Browser.cast.Receiver,
|
|
174
|
-
successCallback:
|
|
174
|
+
successCallback: () => void,
|
|
175
175
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
176
176
|
): void;
|
|
177
177
|
|
|
@@ -294,7 +294,7 @@ export namespace Browser {
|
|
|
294
294
|
*/
|
|
295
295
|
setReceiverVolumeLevel(
|
|
296
296
|
newLevel: number,
|
|
297
|
-
successCallback:
|
|
297
|
+
successCallback: () => void,
|
|
298
298
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
299
299
|
): void;
|
|
300
300
|
|
|
@@ -305,7 +305,7 @@ export namespace Browser {
|
|
|
305
305
|
*/
|
|
306
306
|
setReceiverMuted(
|
|
307
307
|
muted: boolean,
|
|
308
|
-
successCallback:
|
|
308
|
+
successCallback: () => void,
|
|
309
309
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
310
310
|
): void;
|
|
311
311
|
|
|
@@ -313,13 +313,13 @@ export namespace Browser {
|
|
|
313
313
|
* @param successCallback
|
|
314
314
|
* @param errorCallback
|
|
315
315
|
*/
|
|
316
|
-
leave(successCallback:
|
|
316
|
+
leave(successCallback: () => void, errorCallback: (error: Browser.cast.Error) => void): void;
|
|
317
317
|
|
|
318
318
|
/**
|
|
319
319
|
* @param successCallback
|
|
320
320
|
* @param errorCallback
|
|
321
321
|
*/
|
|
322
|
-
stop(successCallback:
|
|
322
|
+
stop(successCallback: () => void, errorCallback: (error: Browser.cast.Error) => void): void;
|
|
323
323
|
|
|
324
324
|
/**
|
|
325
325
|
* @param namespace
|
|
@@ -330,7 +330,7 @@ export namespace Browser {
|
|
|
330
330
|
sendMessage(
|
|
331
331
|
namespace: string,
|
|
332
332
|
message: string | object,
|
|
333
|
-
successCallback:
|
|
333
|
+
successCallback: () => void,
|
|
334
334
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
335
335
|
): void;
|
|
336
336
|
|
|
@@ -887,7 +887,7 @@ export namespace Browser {
|
|
|
887
887
|
*/
|
|
888
888
|
getStatus(
|
|
889
889
|
getStatusRequest: Browser.cast.media.GetStatusRequest,
|
|
890
|
-
successCallback:
|
|
890
|
+
successCallback: () => void,
|
|
891
891
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
892
892
|
): void;
|
|
893
893
|
|
|
@@ -898,7 +898,7 @@ export namespace Browser {
|
|
|
898
898
|
*/
|
|
899
899
|
play(
|
|
900
900
|
playRequest: Browser.cast.media.PlayRequest,
|
|
901
|
-
successCallback:
|
|
901
|
+
successCallback: () => void,
|
|
902
902
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
903
903
|
): void;
|
|
904
904
|
|
|
@@ -909,7 +909,7 @@ export namespace Browser {
|
|
|
909
909
|
*/
|
|
910
910
|
pause(
|
|
911
911
|
pauseRequest: Browser.cast.media.PauseRequest,
|
|
912
|
-
successCallback:
|
|
912
|
+
successCallback: () => void,
|
|
913
913
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
914
914
|
): void;
|
|
915
915
|
|
|
@@ -920,7 +920,7 @@ export namespace Browser {
|
|
|
920
920
|
*/
|
|
921
921
|
seek(
|
|
922
922
|
seekRequest: Browser.cast.media.SeekRequest,
|
|
923
|
-
successCallback:
|
|
923
|
+
successCallback: () => void,
|
|
924
924
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
925
925
|
): void;
|
|
926
926
|
|
|
@@ -931,7 +931,7 @@ export namespace Browser {
|
|
|
931
931
|
*/
|
|
932
932
|
stop(
|
|
933
933
|
stopRequest: Browser.cast.media.StopRequest,
|
|
934
|
-
successCallback:
|
|
934
|
+
successCallback: () => void,
|
|
935
935
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
936
936
|
): void;
|
|
937
937
|
|
|
@@ -942,7 +942,7 @@ export namespace Browser {
|
|
|
942
942
|
*/
|
|
943
943
|
setVolume(
|
|
944
944
|
volumeRequest: Browser.cast.media.VolumeRequest,
|
|
945
|
-
successCallback:
|
|
945
|
+
successCallback: () => void,
|
|
946
946
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
947
947
|
): void;
|
|
948
948
|
|
|
@@ -953,7 +953,7 @@ export namespace Browser {
|
|
|
953
953
|
*/
|
|
954
954
|
editTracksInfo(
|
|
955
955
|
editTracksInfoRequest: Browser.cast.media.EditTracksInfoRequest,
|
|
956
|
-
successCallback:
|
|
956
|
+
successCallback: () => void,
|
|
957
957
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
958
958
|
): void;
|
|
959
959
|
|
|
@@ -986,7 +986,7 @@ export namespace Browser {
|
|
|
986
986
|
*/
|
|
987
987
|
queueAppendItem(
|
|
988
988
|
item: Browser.cast.media.QueueItem,
|
|
989
|
-
successCallback:
|
|
989
|
+
successCallback: () => void,
|
|
990
990
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
991
991
|
): void;
|
|
992
992
|
|
|
@@ -997,7 +997,7 @@ export namespace Browser {
|
|
|
997
997
|
*/
|
|
998
998
|
queueInsertItems(
|
|
999
999
|
queueInsertItemsRequest: Browser.cast.media.QueueInsertItemsRequest,
|
|
1000
|
-
successCallback:
|
|
1000
|
+
successCallback: () => void,
|
|
1001
1001
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
1002
1002
|
): void;
|
|
1003
1003
|
|
|
@@ -1008,7 +1008,7 @@ export namespace Browser {
|
|
|
1008
1008
|
*/
|
|
1009
1009
|
queueJumpToItem(
|
|
1010
1010
|
itemId: number,
|
|
1011
|
-
successCallback:
|
|
1011
|
+
successCallback: () => void,
|
|
1012
1012
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
1013
1013
|
): void;
|
|
1014
1014
|
|
|
@@ -1021,7 +1021,7 @@ export namespace Browser {
|
|
|
1021
1021
|
queueMoveItemToNewIndex(
|
|
1022
1022
|
itemId: number,
|
|
1023
1023
|
newIndex: number,
|
|
1024
|
-
successCallback:
|
|
1024
|
+
successCallback: () => void,
|
|
1025
1025
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
1026
1026
|
): void;
|
|
1027
1027
|
|
|
@@ -1029,13 +1029,13 @@ export namespace Browser {
|
|
|
1029
1029
|
* @param successCallback
|
|
1030
1030
|
* @param errorCallback
|
|
1031
1031
|
*/
|
|
1032
|
-
queueNext(successCallback:
|
|
1032
|
+
queueNext(successCallback: () => void, errorCallback: (error: Browser.cast.Error) => void): void;
|
|
1033
1033
|
|
|
1034
1034
|
/**
|
|
1035
1035
|
* @param successCallback
|
|
1036
1036
|
* @param errorCallback
|
|
1037
1037
|
*/
|
|
1038
|
-
queuePrev(successCallback:
|
|
1038
|
+
queuePrev(successCallback: () => void, errorCallback: (error: Browser.cast.Error) => void): void;
|
|
1039
1039
|
|
|
1040
1040
|
/**
|
|
1041
1041
|
* @param itemId
|
|
@@ -1044,7 +1044,7 @@ export namespace Browser {
|
|
|
1044
1044
|
*/
|
|
1045
1045
|
queueRemoveItem(
|
|
1046
1046
|
itemId: number,
|
|
1047
|
-
successCallback:
|
|
1047
|
+
successCallback: () => void,
|
|
1048
1048
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
1049
1049
|
): void;
|
|
1050
1050
|
|
|
@@ -1055,7 +1055,7 @@ export namespace Browser {
|
|
|
1055
1055
|
*/
|
|
1056
1056
|
queueReorderItems(
|
|
1057
1057
|
queueReorderItemsRequest: Browser.cast.media.QueueReorderItemsRequest,
|
|
1058
|
-
successCallback:
|
|
1058
|
+
successCallback: () => void,
|
|
1059
1059
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
1060
1060
|
): void;
|
|
1061
1061
|
|
|
@@ -1066,7 +1066,7 @@ export namespace Browser {
|
|
|
1066
1066
|
*/
|
|
1067
1067
|
queueSetRepeatMode(
|
|
1068
1068
|
repeatMode: Browser.cast.media.RepeatMode,
|
|
1069
|
-
successCallback:
|
|
1069
|
+
successCallback: () => void,
|
|
1070
1070
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
1071
1071
|
): void;
|
|
1072
1072
|
|
|
@@ -1077,7 +1077,7 @@ export namespace Browser {
|
|
|
1077
1077
|
*/
|
|
1078
1078
|
queueUpdateItems(
|
|
1079
1079
|
queueUpdateItemsRequest: Browser.cast.media.QueueUpdateItemsRequest,
|
|
1080
|
-
successCallback:
|
|
1080
|
+
successCallback: () => void,
|
|
1081
1081
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
1082
1082
|
): void;
|
|
1083
1083
|
}
|
package/src/gen/index.d.ts
CHANGED
|
@@ -1182,7 +1182,7 @@ export namespace Browser {
|
|
|
1182
1182
|
/**
|
|
1183
1183
|
* Sets the icon for the browser action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the path or the imageData property must be specified.
|
|
1184
1184
|
*/
|
|
1185
|
-
export function setIcon(details: TabIconDetails, callback?:
|
|
1185
|
+
export function setIcon(details: TabIconDetails, callback?: () => void): void;
|
|
1186
1186
|
|
|
1187
1187
|
/** Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup. */
|
|
1188
1188
|
export var onClicked: BrowserClickedEvent;
|
|
@@ -2587,7 +2587,7 @@ export namespace Browser {
|
|
|
2587
2587
|
filter: RequestCookie;
|
|
2588
2588
|
}
|
|
2589
2589
|
|
|
2590
|
-
export interface RequestedEvent extends Browser.events.Event<
|
|
2590
|
+
export interface RequestedEvent extends Browser.events.Event<() => void> {}
|
|
2591
2591
|
|
|
2592
2592
|
export var onRequest: RequestedEvent;
|
|
2593
2593
|
}
|
|
@@ -4293,7 +4293,7 @@ export namespace Browser {
|
|
|
4293
4293
|
originAndPathMatches?: string | undefined;
|
|
4294
4294
|
}
|
|
4295
4295
|
|
|
4296
|
-
export interface Event<T extends
|
|
4296
|
+
export interface Event<T extends (...args: any) => void> {
|
|
4297
4297
|
/**
|
|
4298
4298
|
* Registers an event listener callback to an event.
|
|
4299
4299
|
* @param callback Called when an event occurs. The parameters of this function depend on the type of event.
|
|
@@ -5399,7 +5399,7 @@ export namespace Browser {
|
|
|
5399
5399
|
/**
|
|
5400
5400
|
* Sets the default font size.
|
|
5401
5401
|
*/
|
|
5402
|
-
export function setDefaultFontSize(details: DefaultFontSizeDetails, callback:
|
|
5402
|
+
export function setDefaultFontSize(details: DefaultFontSizeDetails, callback: () => void): void;
|
|
5403
5403
|
/**
|
|
5404
5404
|
* Gets the font for a given script and generic font family.
|
|
5405
5405
|
* @return The `getFont` method provides its result via callback or returned as a `Promise` (MV3 only).
|
|
@@ -5441,7 +5441,7 @@ export namespace Browser {
|
|
|
5441
5441
|
/**
|
|
5442
5442
|
* Sets the minimum font size.
|
|
5443
5443
|
*/
|
|
5444
|
-
export function setMinimumFontSize(details: SetFontSizeDetails, callback:
|
|
5444
|
+
export function setMinimumFontSize(details: SetFontSizeDetails, callback: () => void): void;
|
|
5445
5445
|
/**
|
|
5446
5446
|
* Gets the default size for fixed width fonts.
|
|
5447
5447
|
* @param details This parameter is currently unused.
|
|
@@ -5464,8 +5464,8 @@ export namespace Browser {
|
|
|
5464
5464
|
* Clears the default font size set by this extension, if any.
|
|
5465
5465
|
* @param details This parameter is currently unused.
|
|
5466
5466
|
*/
|
|
5467
|
-
export function clearDefaultFontSize(callback:
|
|
5468
|
-
export function clearDefaultFontSize(details: Object, callback:
|
|
5467
|
+
export function clearDefaultFontSize(callback: () => void): void;
|
|
5468
|
+
export function clearDefaultFontSize(details: Object, callback: () => void): void;
|
|
5469
5469
|
/**
|
|
5470
5470
|
* Sets the default size for fixed width fonts.
|
|
5471
5471
|
* @return The `setDefaultFixedFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
|
@@ -5474,7 +5474,7 @@ export namespace Browser {
|
|
|
5474
5474
|
/**
|
|
5475
5475
|
* Sets the default size for fixed width fonts.
|
|
5476
5476
|
*/
|
|
5477
|
-
export function setDefaultFixedFontSize(details: SetFontSizeDetails, callback:
|
|
5477
|
+
export function setDefaultFixedFontSize(details: SetFontSizeDetails, callback: () => void): void;
|
|
5478
5478
|
/**
|
|
5479
5479
|
* Clears the font set by this extension, if any.
|
|
5480
5480
|
* @return The `clearFont` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
|
@@ -5483,7 +5483,7 @@ export namespace Browser {
|
|
|
5483
5483
|
/**
|
|
5484
5484
|
* Clears the font set by this extension, if any.
|
|
5485
5485
|
*/
|
|
5486
|
-
export function clearFont(details: FontDetails, callback:
|
|
5486
|
+
export function clearFont(details: FontDetails, callback: () => void): void;
|
|
5487
5487
|
/**
|
|
5488
5488
|
* Sets the font for a given script and generic font family.
|
|
5489
5489
|
* @return The `setFont` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
|
@@ -5492,7 +5492,7 @@ export namespace Browser {
|
|
|
5492
5492
|
/**
|
|
5493
5493
|
* Sets the font for a given script and generic font family.
|
|
5494
5494
|
*/
|
|
5495
|
-
export function setFont(details: SetFontDetails, callback:
|
|
5495
|
+
export function setFont(details: SetFontDetails, callback: () => void): void;
|
|
5496
5496
|
/**
|
|
5497
5497
|
* Clears the minimum font size set by this extension, if any.
|
|
5498
5498
|
* @param details This parameter is currently unused.
|
|
@@ -5503,8 +5503,8 @@ export namespace Browser {
|
|
|
5503
5503
|
* Clears the minimum font size set by this extension, if any.
|
|
5504
5504
|
* @param details This parameter is currently unused.
|
|
5505
5505
|
*/
|
|
5506
|
-
export function clearMinimumFontSize(callback:
|
|
5507
|
-
export function clearMinimumFontSize(details: Object, callback:
|
|
5506
|
+
export function clearMinimumFontSize(callback: () => void): void;
|
|
5507
|
+
export function clearMinimumFontSize(details: Object, callback: () => void): void;
|
|
5508
5508
|
/**
|
|
5509
5509
|
* Gets a list of fonts on the system.
|
|
5510
5510
|
* @return The `getFontList` method provides its result via callback or returned as a `Promise` (MV3 only).
|
|
@@ -5524,7 +5524,7 @@ export namespace Browser {
|
|
|
5524
5524
|
* Clears the default fixed font size set by this extension, if any.
|
|
5525
5525
|
* @param details This parameter is currently unused.
|
|
5526
5526
|
*/
|
|
5527
|
-
export function clearDefaultFixedFontSize(details: Object, callback:
|
|
5527
|
+
export function clearDefaultFixedFontSize(details: Object, callback: () => void): void;
|
|
5528
5528
|
|
|
5529
5529
|
/** Fired when the default fixed font size setting changes. */
|
|
5530
5530
|
export var onDefaultFixedFontSizeChanged: DefaultFixedFontSizeChangedEvent;
|
|
@@ -7480,7 +7480,7 @@ export namespace Browser {
|
|
|
7480
7480
|
*/
|
|
7481
7481
|
export namespace permissions {
|
|
7482
7482
|
export interface Permissions {
|
|
7483
|
-
/** The list of host permissions, including those specified in the `optional_permissions` or `permissions` keys in the manifest, and those associated with [Content Scripts](https://developer.
|
|
7483
|
+
/** The list of host permissions, including those specified in the `optional_permissions` or `permissions` keys in the manifest, and those associated with [Content Scripts](https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts). */
|
|
7484
7484
|
origins?: string[];
|
|
7485
7485
|
/** List of named permissions (does not include hosts or origins). */
|
|
7486
7486
|
permissions?: Browser.runtime.ManifestPermissions[];
|
|
@@ -7883,6 +7883,13 @@ export namespace Browser {
|
|
|
7883
7883
|
export function cancelJob(jobId: string): Promise<void>;
|
|
7884
7884
|
export function cancelJob(jobId: string, callback: () => void): void;
|
|
7885
7885
|
|
|
7886
|
+
/**
|
|
7887
|
+
* Returns the status of the print job. This call will fail with a runtime error if the print job with the given `jobId` doesn't exist. `jobId`: The id of the print job to return the status of. This should be the same id received in a {@link SubmitJobResponse}.
|
|
7888
|
+
* @since Chrome 135
|
|
7889
|
+
*/
|
|
7890
|
+
export function getJobStatus(jobId: string): Promise<`${JobStatus}`>;
|
|
7891
|
+
export function getJobStatus(jobId: string, callback: (status: `${JobStatus}`) => void): void;
|
|
7892
|
+
|
|
7886
7893
|
/**
|
|
7887
7894
|
* Returns the status and capabilities of the printer in CDD format. This call will fail with a runtime error if no printers with given id are installed.
|
|
7888
7895
|
* Can return its result via Promise in Manifest V3 or later since Chrome 100.
|
|
@@ -7907,7 +7914,7 @@ export namespace Browser {
|
|
|
7907
7914
|
/**
|
|
7908
7915
|
* Event fired when the status of the job is changed. This is only fired for the jobs created by this extension.
|
|
7909
7916
|
*/
|
|
7910
|
-
export const onJobStatusChanged: Browser.events.Event<(jobId: string, status: JobStatus) => void>;
|
|
7917
|
+
export const onJobStatusChanged: Browser.events.Event<(jobId: string, status: `${JobStatus}`) => void>;
|
|
7911
7918
|
}
|
|
7912
7919
|
|
|
7913
7920
|
////////////////////
|
|
@@ -8498,7 +8505,7 @@ export namespace Browser {
|
|
|
8498
8505
|
}
|
|
8499
8506
|
|
|
8500
8507
|
export interface ConnectionOptions {
|
|
8501
|
-
/** Optional. Flag indicating whether or not the connection should be left open when the application is suspended (see Manage App Lifecycle: https://developer.
|
|
8508
|
+
/** Optional. Flag indicating whether or not the connection should be left open when the application is suspended (see Manage App Lifecycle: https://developer.chrome.com/apps/app_lifecycle).
|
|
8502
8509
|
* The default value is "false." When the application is loaded, any serial connections previously opened with persistent=true can be fetched with getConnections. */
|
|
8503
8510
|
persistent?: boolean | undefined;
|
|
8504
8511
|
/** Optional. An application-defined string to associate with the connection. */
|
|
@@ -8716,13 +8723,13 @@ export namespace Browser {
|
|
|
8716
8723
|
/** The ID of the extension/app. */
|
|
8717
8724
|
export var id: string;
|
|
8718
8725
|
|
|
8719
|
-
/** https://developer.
|
|
8726
|
+
/** https://developer.chrome.com/docs/extensions/reference/api/runtime#type-PlatformOs */
|
|
8720
8727
|
export type PlatformOs = "mac" | "win" | "android" | "cros" | "linux" | "openbsd" | "fuchsia";
|
|
8721
|
-
/** https://developer.
|
|
8728
|
+
/** https://developer.chrome.com/docs/extensions/reference/api/runtime#type-PlatformArch */
|
|
8722
8729
|
export type PlatformArch = "arm" | "arm64" | "x86-32" | "x86-64" | "mips" | "mips64";
|
|
8723
|
-
/** https://developer.
|
|
8730
|
+
/** https://developer.chrome.com/docs/extensions/reference/api/runtime#type-PlatformNaclArch */
|
|
8724
8731
|
export type PlatformNaclArch = "arm" | "x86-32" | "x86-64" | "mips" | "mips64";
|
|
8725
|
-
/** https://developer.
|
|
8732
|
+
/** https://developer.chrome.com/docs/extensions/reference/api/runtime#type-ContextType */
|
|
8726
8733
|
export enum ContextType {
|
|
8727
8734
|
TAB = "TAB",
|
|
8728
8735
|
POPUP = "POPUP",
|
|
@@ -8731,7 +8738,7 @@ export namespace Browser {
|
|
|
8731
8738
|
SIDE_PANEL = "SIDE_PANEL",
|
|
8732
8739
|
DEVELOPER_TOOLS = "DEVELOPER_TOOLS",
|
|
8733
8740
|
}
|
|
8734
|
-
/** https://developer.
|
|
8741
|
+
/** https://developer.chrome.com/docs/extensions/reference/api/runtime#type-OnInstalledReason */
|
|
8735
8742
|
export enum OnInstalledReason {
|
|
8736
8743
|
INSTALL = "install",
|
|
8737
8744
|
UPDATE = "update",
|
|
@@ -8958,7 +8965,7 @@ export namespace Browser {
|
|
|
8958
8965
|
default_popup?: string | undefined;
|
|
8959
8966
|
}
|
|
8960
8967
|
|
|
8961
|
-
/** Source: https://developer.
|
|
8968
|
+
/** Source: https://developer.chrome.com/docs/extensions/reference/permissions-list */
|
|
8962
8969
|
export type ManifestPermissions =
|
|
8963
8970
|
| "accessibilityFeatures.modify"
|
|
8964
8971
|
| "accessibilityFeatures.read"
|
|
@@ -9042,7 +9049,7 @@ export namespace Browser {
|
|
|
9042
9049
|
| "webRequestBlocking"
|
|
9043
9050
|
| "webRequestAuthProvider";
|
|
9044
9051
|
|
|
9045
|
-
/** Source : https://developer.
|
|
9052
|
+
/** Source : https://developer.chrome.com/docs/extensions/reference/api/permissions */
|
|
9046
9053
|
export type ManifestOptionalPermissions = Exclude<
|
|
9047
9054
|
ManifestPermissions,
|
|
9048
9055
|
| "debugger"
|
|
@@ -11685,7 +11692,7 @@ export namespace Browser {
|
|
|
11685
11692
|
* Closes a tab.
|
|
11686
11693
|
* @param tabId The tab to close.
|
|
11687
11694
|
*/
|
|
11688
|
-
export function remove(tabId: number, callback:
|
|
11695
|
+
export function remove(tabId: number, callback: () => void): void;
|
|
11689
11696
|
/**
|
|
11690
11697
|
* Closes several tabs.
|
|
11691
11698
|
* @param tabIds The list of tabs to close.
|
|
@@ -11696,7 +11703,7 @@ export namespace Browser {
|
|
|
11696
11703
|
* Closes several tabs.
|
|
11697
11704
|
* @param tabIds The list of tabs to close.
|
|
11698
11705
|
*/
|
|
11699
|
-
export function remove(tabIds: number[], callback:
|
|
11706
|
+
export function remove(tabIds: number[], callback: () => void): void;
|
|
11700
11707
|
/**
|
|
11701
11708
|
* Captures the visible area of the currently active tab in the specified window. You must have <all_urls> permission to use this method.
|
|
11702
11709
|
* @param callback
|
|
@@ -11876,7 +11883,7 @@ export namespace Browser {
|
|
|
11876
11883
|
* @param details Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.
|
|
11877
11884
|
* @param callback Optional. Called when all the CSS has been inserted.
|
|
11878
11885
|
*/
|
|
11879
|
-
export function insertCSS(details: InjectDetails, callback:
|
|
11886
|
+
export function insertCSS(details: InjectDetails, callback: () => void): void;
|
|
11880
11887
|
/**
|
|
11881
11888
|
* Injects CSS into a page. For details, see the programmatic injection section of the content scripts doc.
|
|
11882
11889
|
* @param tabId Optional. The ID of the tab in which to insert the CSS; defaults to the active tab of the current window.
|
|
@@ -11890,7 +11897,7 @@ export namespace Browser {
|
|
|
11890
11897
|
* @param details Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.
|
|
11891
11898
|
* @param callback Optional. Called when all the CSS has been inserted.
|
|
11892
11899
|
*/
|
|
11893
|
-
export function insertCSS(tabId: number, details: InjectDetails, callback:
|
|
11900
|
+
export function insertCSS(tabId: number, details: InjectDetails, callback: () => void): void;
|
|
11894
11901
|
/**
|
|
11895
11902
|
* Highlights the given tabs.
|
|
11896
11903
|
* @since Chrome 16
|
|
@@ -12852,19 +12859,19 @@ export namespace Browser {
|
|
|
12852
12859
|
* @param id ID of the VPN configuration to destroy.
|
|
12853
12860
|
* @param callback Optional. Called when the configuration is destroyed or if there is an error.
|
|
12854
12861
|
*/
|
|
12855
|
-
export function destroyConfig(id: string, callback?:
|
|
12862
|
+
export function destroyConfig(id: string, callback?: () => void): void;
|
|
12856
12863
|
/**
|
|
12857
12864
|
* Sets the parameters for the VPN session. This should be called immediately after "connected" is received from the platform. This will succeed only when the VPN session is owned by the extension.
|
|
12858
12865
|
* @param parameters The parameters for the VPN session.
|
|
12859
12866
|
* @param callback Called when the parameters are set or if there is an error.
|
|
12860
12867
|
*/
|
|
12861
|
-
export function setParameters(parameters: VpnSessionParameters, callback
|
|
12868
|
+
export function setParameters(parameters: VpnSessionParameters, callback?: () => void): void;
|
|
12862
12869
|
/**
|
|
12863
12870
|
* Sends an IP packet through the tunnel created for the VPN session. This will succeed only when the VPN session is owned by the extension.
|
|
12864
12871
|
* @param data The IP packet to be sent to the platform.
|
|
12865
12872
|
* @param callback Optional. Called when the packet is sent or if there is an error.
|
|
12866
12873
|
*/
|
|
12867
|
-
export function sendPacket(data: ArrayBuffer, callback?:
|
|
12874
|
+
export function sendPacket(data: ArrayBuffer, callback?: () => void): void;
|
|
12868
12875
|
/**
|
|
12869
12876
|
* Notifies the VPN session state to the platform. This will succeed only when the VPN session is owned by the extension.
|
|
12870
12877
|
* @param state The VPN session state of the VPN client.
|
|
@@ -12872,7 +12879,7 @@ export namespace Browser {
|
|
|
12872
12879
|
* failure: VPN connection failed.
|
|
12873
12880
|
* @param callback Optional. Called when the notification is complete or if there is an error.
|
|
12874
12881
|
*/
|
|
12875
|
-
export function notifyConnectionStateChanged(state: string, callback?:
|
|
12882
|
+
export function notifyConnectionStateChanged(state: string, callback?: () => void): void;
|
|
12876
12883
|
|
|
12877
12884
|
/** Triggered when a message is received from the platform for a VPN configuration owned by the extension. */
|
|
12878
12885
|
export var onPlatformMessage: VpnPlatformMessageEvent;
|
|
@@ -13145,7 +13152,7 @@ export namespace Browser {
|
|
|
13145
13152
|
* Manifest: "host_permissions"
|
|
13146
13153
|
*/
|
|
13147
13154
|
export namespace webRequest {
|
|
13148
|
-
interface WebRequestEvent<T extends
|
|
13155
|
+
interface WebRequestEvent<T extends (...args: any) => void, U extends string[]>
|
|
13149
13156
|
extends Omit<Browser.events.Event<T>, "addListener">
|
|
13150
13157
|
{
|
|
13151
13158
|
addListener(callback: T, filter: RequestFilter, extraInfoSpec?: U): void;
|
|
@@ -13402,7 +13409,7 @@ export namespace Browser {
|
|
|
13402
13409
|
* Can return its result via Promise in Manifest V3 or later since Chrome 116.
|
|
13403
13410
|
*/
|
|
13404
13411
|
export function handlerBehaviorChanged(): Promise<void>;
|
|
13405
|
-
export function handlerBehaviorChanged(callback:
|
|
13412
|
+
export function handlerBehaviorChanged(callback: () => void): void;
|
|
13406
13413
|
|
|
13407
13414
|
/** Fired when a request is about to occur. */
|
|
13408
13415
|
export const onBeforeRequest: WebRequestBodyEvent;
|
|
@@ -13736,7 +13743,7 @@ export namespace Browser {
|
|
|
13736
13743
|
*/
|
|
13737
13744
|
export function remove(windowId: number): Promise<void>;
|
|
13738
13745
|
/** Removes (closes) a window, and all the tabs inside it. */
|
|
13739
|
-
export function remove(windowId: number, callback:
|
|
13746
|
+
export function remove(windowId: number, callback: () => void): void;
|
|
13740
13747
|
/**
|
|
13741
13748
|
* Gets the window that was most recently focused — typically the window 'on top'.
|
|
13742
13749
|
*/
|
|
@@ -14563,7 +14570,7 @@ export namespace Browser {
|
|
|
14563
14570
|
export function isRegexSupported(regexOptions: RegexOptions): Promise<IsRegexSupportedResult>;
|
|
14564
14571
|
|
|
14565
14572
|
/** Configures if the action count for tabs should be displayed as the extension action's badge text and provides a way for that action count to be incremented. */
|
|
14566
|
-
export function setExtensionActionOptions(options: ExtensionActionOptions, callback:
|
|
14573
|
+
export function setExtensionActionOptions(options: ExtensionActionOptions, callback: () => void): void;
|
|
14567
14574
|
|
|
14568
14575
|
/**
|
|
14569
14576
|
* Configures if the action count for tabs should be displayed as the extension action's badge text and provides a way for that action count to be incremented.
|
|
@@ -14595,7 +14602,7 @@ export namespace Browser {
|
|
|
14595
14602
|
* In case of an error, runtime.lastError will be set and no change will be made to the rule set.
|
|
14596
14603
|
* This can happen for multiple reasons, such as invalid rule format, duplicate rule ID, rule count limit exceeded, internal errors, and others.
|
|
14597
14604
|
*/
|
|
14598
|
-
export function updateDynamicRules(options: UpdateRuleOptions, callback:
|
|
14605
|
+
export function updateDynamicRules(options: UpdateRuleOptions, callback: () => void): void;
|
|
14599
14606
|
|
|
14600
14607
|
/** Modifies the current set of dynamic rules for the extension.
|
|
14601
14608
|
* The rules with IDs listed in options.removeRuleIds are first removed, and then the rules given in options.addRules are added.
|
|
@@ -14621,7 +14628,7 @@ export namespace Browser {
|
|
|
14621
14628
|
* In case of an error, runtime.lastError will be set and no change will be made to set of enabled rulesets.
|
|
14622
14629
|
* This can happen for multiple reasons, such as invalid ruleset IDs, rule count limit exceeded, or internal errors.
|
|
14623
14630
|
*/
|
|
14624
|
-
export function updateEnabledRulesets(options: UpdateRulesetOptions, callback:
|
|
14631
|
+
export function updateEnabledRulesets(options: UpdateRulesetOptions, callback: () => void): void;
|
|
14625
14632
|
|
|
14626
14633
|
/** Updates the set of enabled static rulesets for the extension.
|
|
14627
14634
|
* The rulesets with IDs listed in options.disableRulesetIds are first removed, and then the rulesets listed in options.enableRulesetIds are added.
|
|
@@ -14646,7 +14653,7 @@ export namespace Browser {
|
|
|
14646
14653
|
* In case of an error, runtime.lastError will be set and no change will be made to the rule set.
|
|
14647
14654
|
* This can happen for multiple reasons, such as invalid rule format, duplicate rule ID, rule count limit exceeded, and others.
|
|
14648
14655
|
*/
|
|
14649
|
-
export function updateSessionRules(options: UpdateRuleOptions, callback:
|
|
14656
|
+
export function updateSessionRules(options: UpdateRuleOptions, callback: () => void): void;
|
|
14650
14657
|
|
|
14651
14658
|
/** Modifies the current set of session scoped rules for the extension.
|
|
14652
14659
|
* The rules with IDs listed in options.removeRuleIds are first removed, and then the rules given in options.addRules are added.
|