@wxt-dev/browser 0.0.319 → 0.0.321
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 +2 -2
- package/src/gen/chrome-cast/index.d.ts +26 -25
- package/src/gen/index.d.ts +65 -61
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.321",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.mjs",
|
|
7
7
|
"types": "src/index.d.ts",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"src"
|
|
20
20
|
],
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@types/chrome": "0.0.
|
|
22
|
+
"@types/chrome": "0.0.321",
|
|
23
23
|
"fs-extra": "^11.3.0",
|
|
24
24
|
"nano-spawn": "^0.2.0",
|
|
25
25
|
"tsx": "4.19.4",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* DO NOT EDIT - generated by scripts/generate.ts */
|
|
2
2
|
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-wrapper-object-types */
|
|
3
4
|
export namespace Browser {
|
|
4
5
|
////////////////////
|
|
5
6
|
// Cast
|
|
@@ -112,7 +113,7 @@ export namespace Browser {
|
|
|
112
113
|
*/
|
|
113
114
|
export function initialize(
|
|
114
115
|
apiConfig: Browser.cast.ApiConfig,
|
|
115
|
-
successCallback:
|
|
116
|
+
successCallback: () => void,
|
|
116
117
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
117
118
|
): void;
|
|
118
119
|
|
|
@@ -160,7 +161,7 @@ export namespace Browser {
|
|
|
160
161
|
*/
|
|
161
162
|
export function setCustomReceivers(
|
|
162
163
|
receivers: Browser.cast.Receiver[],
|
|
163
|
-
successCallback:
|
|
164
|
+
successCallback: () => void,
|
|
164
165
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
165
166
|
): void;
|
|
166
167
|
|
|
@@ -171,7 +172,7 @@ export namespace Browser {
|
|
|
171
172
|
*/
|
|
172
173
|
export function setReceiverDisplayStatus(
|
|
173
174
|
receiver: Browser.cast.Receiver,
|
|
174
|
-
successCallback:
|
|
175
|
+
successCallback: () => void,
|
|
175
176
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
176
177
|
): void;
|
|
177
178
|
|
|
@@ -294,7 +295,7 @@ export namespace Browser {
|
|
|
294
295
|
*/
|
|
295
296
|
setReceiverVolumeLevel(
|
|
296
297
|
newLevel: number,
|
|
297
|
-
successCallback:
|
|
298
|
+
successCallback: () => void,
|
|
298
299
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
299
300
|
): void;
|
|
300
301
|
|
|
@@ -305,7 +306,7 @@ export namespace Browser {
|
|
|
305
306
|
*/
|
|
306
307
|
setReceiverMuted(
|
|
307
308
|
muted: boolean,
|
|
308
|
-
successCallback:
|
|
309
|
+
successCallback: () => void,
|
|
309
310
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
310
311
|
): void;
|
|
311
312
|
|
|
@@ -313,13 +314,13 @@ export namespace Browser {
|
|
|
313
314
|
* @param successCallback
|
|
314
315
|
* @param errorCallback
|
|
315
316
|
*/
|
|
316
|
-
leave(successCallback:
|
|
317
|
+
leave(successCallback: () => void, errorCallback: (error: Browser.cast.Error) => void): void;
|
|
317
318
|
|
|
318
319
|
/**
|
|
319
320
|
* @param successCallback
|
|
320
321
|
* @param errorCallback
|
|
321
322
|
*/
|
|
322
|
-
stop(successCallback:
|
|
323
|
+
stop(successCallback: () => void, errorCallback: (error: Browser.cast.Error) => void): void;
|
|
323
324
|
|
|
324
325
|
/**
|
|
325
326
|
* @param namespace
|
|
@@ -330,7 +331,7 @@ export namespace Browser {
|
|
|
330
331
|
sendMessage(
|
|
331
332
|
namespace: string,
|
|
332
333
|
message: string | object,
|
|
333
|
-
successCallback:
|
|
334
|
+
successCallback: () => void,
|
|
334
335
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
335
336
|
): void;
|
|
336
337
|
|
|
@@ -887,7 +888,7 @@ export namespace Browser {
|
|
|
887
888
|
*/
|
|
888
889
|
getStatus(
|
|
889
890
|
getStatusRequest: Browser.cast.media.GetStatusRequest,
|
|
890
|
-
successCallback:
|
|
891
|
+
successCallback: () => void,
|
|
891
892
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
892
893
|
): void;
|
|
893
894
|
|
|
@@ -898,7 +899,7 @@ export namespace Browser {
|
|
|
898
899
|
*/
|
|
899
900
|
play(
|
|
900
901
|
playRequest: Browser.cast.media.PlayRequest,
|
|
901
|
-
successCallback:
|
|
902
|
+
successCallback: () => void,
|
|
902
903
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
903
904
|
): void;
|
|
904
905
|
|
|
@@ -909,7 +910,7 @@ export namespace Browser {
|
|
|
909
910
|
*/
|
|
910
911
|
pause(
|
|
911
912
|
pauseRequest: Browser.cast.media.PauseRequest,
|
|
912
|
-
successCallback:
|
|
913
|
+
successCallback: () => void,
|
|
913
914
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
914
915
|
): void;
|
|
915
916
|
|
|
@@ -920,7 +921,7 @@ export namespace Browser {
|
|
|
920
921
|
*/
|
|
921
922
|
seek(
|
|
922
923
|
seekRequest: Browser.cast.media.SeekRequest,
|
|
923
|
-
successCallback:
|
|
924
|
+
successCallback: () => void,
|
|
924
925
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
925
926
|
): void;
|
|
926
927
|
|
|
@@ -931,7 +932,7 @@ export namespace Browser {
|
|
|
931
932
|
*/
|
|
932
933
|
stop(
|
|
933
934
|
stopRequest: Browser.cast.media.StopRequest,
|
|
934
|
-
successCallback:
|
|
935
|
+
successCallback: () => void,
|
|
935
936
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
936
937
|
): void;
|
|
937
938
|
|
|
@@ -942,7 +943,7 @@ export namespace Browser {
|
|
|
942
943
|
*/
|
|
943
944
|
setVolume(
|
|
944
945
|
volumeRequest: Browser.cast.media.VolumeRequest,
|
|
945
|
-
successCallback:
|
|
946
|
+
successCallback: () => void,
|
|
946
947
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
947
948
|
): void;
|
|
948
949
|
|
|
@@ -953,7 +954,7 @@ export namespace Browser {
|
|
|
953
954
|
*/
|
|
954
955
|
editTracksInfo(
|
|
955
956
|
editTracksInfoRequest: Browser.cast.media.EditTracksInfoRequest,
|
|
956
|
-
successCallback:
|
|
957
|
+
successCallback: () => void,
|
|
957
958
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
958
959
|
): void;
|
|
959
960
|
|
|
@@ -986,7 +987,7 @@ export namespace Browser {
|
|
|
986
987
|
*/
|
|
987
988
|
queueAppendItem(
|
|
988
989
|
item: Browser.cast.media.QueueItem,
|
|
989
|
-
successCallback:
|
|
990
|
+
successCallback: () => void,
|
|
990
991
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
991
992
|
): void;
|
|
992
993
|
|
|
@@ -997,7 +998,7 @@ export namespace Browser {
|
|
|
997
998
|
*/
|
|
998
999
|
queueInsertItems(
|
|
999
1000
|
queueInsertItemsRequest: Browser.cast.media.QueueInsertItemsRequest,
|
|
1000
|
-
successCallback:
|
|
1001
|
+
successCallback: () => void,
|
|
1001
1002
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
1002
1003
|
): void;
|
|
1003
1004
|
|
|
@@ -1008,7 +1009,7 @@ export namespace Browser {
|
|
|
1008
1009
|
*/
|
|
1009
1010
|
queueJumpToItem(
|
|
1010
1011
|
itemId: number,
|
|
1011
|
-
successCallback:
|
|
1012
|
+
successCallback: () => void,
|
|
1012
1013
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
1013
1014
|
): void;
|
|
1014
1015
|
|
|
@@ -1021,7 +1022,7 @@ export namespace Browser {
|
|
|
1021
1022
|
queueMoveItemToNewIndex(
|
|
1022
1023
|
itemId: number,
|
|
1023
1024
|
newIndex: number,
|
|
1024
|
-
successCallback:
|
|
1025
|
+
successCallback: () => void,
|
|
1025
1026
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
1026
1027
|
): void;
|
|
1027
1028
|
|
|
@@ -1029,13 +1030,13 @@ export namespace Browser {
|
|
|
1029
1030
|
* @param successCallback
|
|
1030
1031
|
* @param errorCallback
|
|
1031
1032
|
*/
|
|
1032
|
-
queueNext(successCallback:
|
|
1033
|
+
queueNext(successCallback: () => void, errorCallback: (error: Browser.cast.Error) => void): void;
|
|
1033
1034
|
|
|
1034
1035
|
/**
|
|
1035
1036
|
* @param successCallback
|
|
1036
1037
|
* @param errorCallback
|
|
1037
1038
|
*/
|
|
1038
|
-
queuePrev(successCallback:
|
|
1039
|
+
queuePrev(successCallback: () => void, errorCallback: (error: Browser.cast.Error) => void): void;
|
|
1039
1040
|
|
|
1040
1041
|
/**
|
|
1041
1042
|
* @param itemId
|
|
@@ -1044,7 +1045,7 @@ export namespace Browser {
|
|
|
1044
1045
|
*/
|
|
1045
1046
|
queueRemoveItem(
|
|
1046
1047
|
itemId: number,
|
|
1047
|
-
successCallback:
|
|
1048
|
+
successCallback: () => void,
|
|
1048
1049
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
1049
1050
|
): void;
|
|
1050
1051
|
|
|
@@ -1055,7 +1056,7 @@ export namespace Browser {
|
|
|
1055
1056
|
*/
|
|
1056
1057
|
queueReorderItems(
|
|
1057
1058
|
queueReorderItemsRequest: Browser.cast.media.QueueReorderItemsRequest,
|
|
1058
|
-
successCallback:
|
|
1059
|
+
successCallback: () => void,
|
|
1059
1060
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
1060
1061
|
): void;
|
|
1061
1062
|
|
|
@@ -1066,7 +1067,7 @@ export namespace Browser {
|
|
|
1066
1067
|
*/
|
|
1067
1068
|
queueSetRepeatMode(
|
|
1068
1069
|
repeatMode: Browser.cast.media.RepeatMode,
|
|
1069
|
-
successCallback:
|
|
1070
|
+
successCallback: () => void,
|
|
1070
1071
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
1071
1072
|
): void;
|
|
1072
1073
|
|
|
@@ -1077,7 +1078,7 @@ export namespace Browser {
|
|
|
1077
1078
|
*/
|
|
1078
1079
|
queueUpdateItems(
|
|
1079
1080
|
queueUpdateItemsRequest: Browser.cast.media.QueueUpdateItemsRequest,
|
|
1080
|
-
successCallback:
|
|
1081
|
+
successCallback: () => void,
|
|
1081
1082
|
errorCallback: (error: Browser.cast.Error) => void,
|
|
1082
1083
|
): void;
|
|
1083
1084
|
}
|
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;
|
|
@@ -2357,13 +2357,13 @@ export namespace Browser {
|
|
|
2357
2357
|
export function sendCommand(
|
|
2358
2358
|
target: DebuggerSession,
|
|
2359
2359
|
method: string,
|
|
2360
|
-
commandParams?:
|
|
2361
|
-
): Promise<
|
|
2360
|
+
commandParams?: { [key: string]: unknown },
|
|
2361
|
+
): Promise<object | undefined>;
|
|
2362
2362
|
export function sendCommand(
|
|
2363
2363
|
target: DebuggerSession,
|
|
2364
2364
|
method: string,
|
|
2365
|
-
commandParams?:
|
|
2366
|
-
callback?: (result?:
|
|
2365
|
+
commandParams?: { [key: string]: unknown },
|
|
2366
|
+
callback?: (result?: object) => void,
|
|
2367
2367
|
): void;
|
|
2368
2368
|
|
|
2369
2369
|
/**
|
|
@@ -2377,7 +2377,7 @@ export namespace Browser {
|
|
|
2377
2377
|
/** Fired when browser terminates debugging session for the tab. This happens when either the tab is being closed or Chrome DevTools is being invoked for the attached tab. */
|
|
2378
2378
|
export const onDetach: Browser.events.Event<(source: Debuggee, reason: `${DetachReason}`) => void>;
|
|
2379
2379
|
/** Fired whenever debugging target issues instrumentation event. */
|
|
2380
|
-
export const onEvent: Browser.events.Event<(source: DebuggerSession, method: string, params?:
|
|
2380
|
+
export const onEvent: Browser.events.Event<(source: DebuggerSession, method: string, params?: object) => void>;
|
|
2381
2381
|
}
|
|
2382
2382
|
|
|
2383
2383
|
export { _debugger as debugger };
|
|
@@ -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
|
}
|
|
@@ -2671,7 +2671,7 @@ export namespace Browser {
|
|
|
2671
2671
|
/**
|
|
2672
2672
|
* Set to undefined if the resource content was set successfully; describes error otherwise.
|
|
2673
2673
|
*/
|
|
2674
|
-
error?:
|
|
2674
|
+
error?: object,
|
|
2675
2675
|
) => void,
|
|
2676
2676
|
): void;
|
|
2677
2677
|
}
|
|
@@ -2944,13 +2944,13 @@ export namespace Browser {
|
|
|
2944
2944
|
* @param rootTitle An optional title for the root of the expression tree.
|
|
2945
2945
|
* @param callback A callback invoked after the sidebar is updated with the object.
|
|
2946
2946
|
*/
|
|
2947
|
-
setObject(jsonObject:
|
|
2947
|
+
setObject(jsonObject: { [key: string]: unknown }, rootTitle?: string, callback?: () => void): void;
|
|
2948
2948
|
/**
|
|
2949
2949
|
* Sets a JSON-compliant object to be displayed in the sidebar pane.
|
|
2950
2950
|
* @param jsonObject An object to be displayed in context of the inspected page. Evaluated in the context of the caller (API client).
|
|
2951
2951
|
* @param callback A callback invoked after the sidebar is updated with the object.
|
|
2952
2952
|
*/
|
|
2953
|
-
setObject(jsonObject:
|
|
2953
|
+
setObject(jsonObject: { [key: string]: unknown }, callback?: () => void): void;
|
|
2954
2954
|
/**
|
|
2955
2955
|
* Sets an HTML page to be displayed in the sidebar pane.
|
|
2956
2956
|
* @param path Relative path of an extension page to display within the sidebar.
|
|
@@ -3037,19 +3037,19 @@ export namespace Browser {
|
|
|
3037
3037
|
* @param recording A recording of the user interaction with the page. This should match [Puppeteer's recording schema](https://github.com/puppeteer/replay/blob/main/docs/api/interfaces/Schema.UserFlow.md).
|
|
3038
3038
|
* @since Chrome 112
|
|
3039
3039
|
*/
|
|
3040
|
-
replay?(recording:
|
|
3040
|
+
replay?(recording: { [key: string]: unknown }): void;
|
|
3041
3041
|
|
|
3042
3042
|
/**
|
|
3043
3043
|
* Converts a recording from the Recorder panel format into a string.
|
|
3044
3044
|
* @param recording A recording of the user interaction with the page. This should match [Puppeteer's recording schema](https://github.com/puppeteer/replay/blob/main/docs/api/interfaces/Schema.UserFlow.md).
|
|
3045
3045
|
*/
|
|
3046
|
-
stringify?(recording:
|
|
3046
|
+
stringify?(recording: { [key: string]: unknown }): void;
|
|
3047
3047
|
|
|
3048
3048
|
/**
|
|
3049
3049
|
* Converts a step of the recording from the Recorder panel format into a string.
|
|
3050
3050
|
* @param step A step of the recording of a user interaction with the page. This should match [Puppeteer's step schema](https://github.com/puppeteer/replay/blob/main/docs/api/modules/Schema.md#step).
|
|
3051
3051
|
*/
|
|
3052
|
-
stringifyStep?(step:
|
|
3052
|
+
stringifyStep?(step: { [key: string]: unknown }): void;
|
|
3053
3053
|
}
|
|
3054
3054
|
|
|
3055
3055
|
/**
|
|
@@ -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.
|
|
@@ -4518,7 +4518,7 @@ export namespace Browser {
|
|
|
4518
4518
|
|
|
4519
4519
|
export interface SelectionResult {
|
|
4520
4520
|
/** Optional. Selected file entry. It will be null if a file hasn't been selected. */
|
|
4521
|
-
entry?:
|
|
4521
|
+
entry?: object | null | undefined;
|
|
4522
4522
|
/** Whether the file has been selected. */
|
|
4523
4523
|
success: boolean;
|
|
4524
4524
|
}
|
|
@@ -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).
|
|
@@ -5414,25 +5414,25 @@ export namespace Browser {
|
|
|
5414
5414
|
* @param details This parameter is currently unused.
|
|
5415
5415
|
* @return The `getDefaultFontSize` method provides its result via callback or returned as a `Promise` (MV3 only).
|
|
5416
5416
|
*/
|
|
5417
|
-
export function getDefaultFontSize(details?:
|
|
5417
|
+
export function getDefaultFontSize(details?: unknown): Promise<FontSizeDetails>;
|
|
5418
5418
|
/**
|
|
5419
5419
|
* Gets the default font size.
|
|
5420
5420
|
* @param details This parameter is currently unused.
|
|
5421
5421
|
*/
|
|
5422
5422
|
export function getDefaultFontSize(callback: (options: FontSizeDetails) => void): void;
|
|
5423
|
-
export function getDefaultFontSize(details:
|
|
5423
|
+
export function getDefaultFontSize(details: unknown, callback: (options: FontSizeDetails) => void): void;
|
|
5424
5424
|
/**
|
|
5425
5425
|
* Gets the minimum font size.
|
|
5426
5426
|
* @param details This parameter is currently unused.
|
|
5427
5427
|
* @return The `getMinimumFontSize` method provides its result via callback or returned as a `Promise` (MV3 only).
|
|
5428
5428
|
*/
|
|
5429
|
-
export function getMinimumFontSize(details?:
|
|
5429
|
+
export function getMinimumFontSize(details?: unknown): Promise<FontSizeDetails>;
|
|
5430
5430
|
/**
|
|
5431
5431
|
* Gets the minimum font size.
|
|
5432
5432
|
* @param details This parameter is currently unused.
|
|
5433
5433
|
*/
|
|
5434
5434
|
export function getMinimumFontSize(callback: (options: FontSizeDetails) => void): void;
|
|
5435
|
-
export function getMinimumFontSize(details:
|
|
5435
|
+
export function getMinimumFontSize(details: unknown, callback: (options: FontSizeDetails) => void): void;
|
|
5436
5436
|
/**
|
|
5437
5437
|
* Sets the minimum font size.
|
|
5438
5438
|
* @return The `setMinimumFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
|
@@ -5441,31 +5441,31 @@ 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.
|
|
5448
5448
|
* @return The `getDefaultFixedFontSize` method provides its result via callback or returned as a `Promise` (MV3 only).
|
|
5449
5449
|
*/
|
|
5450
|
-
export function getDefaultFixedFontSize(details?:
|
|
5450
|
+
export function getDefaultFixedFontSize(details?: unknown): Promise<FontSizeDetails>;
|
|
5451
5451
|
/**
|
|
5452
5452
|
* Gets the default size for fixed width fonts.
|
|
5453
5453
|
* @param details This parameter is currently unused.
|
|
5454
5454
|
*/
|
|
5455
5455
|
export function getDefaultFixedFontSize(callback: (details: FontSizeDetails) => void): void;
|
|
5456
|
-
export function getDefaultFixedFontSize(details:
|
|
5456
|
+
export function getDefaultFixedFontSize(details: unknown, callback: (details: FontSizeDetails) => void): void;
|
|
5457
5457
|
/**
|
|
5458
5458
|
* Clears the default font size set by this extension, if any.
|
|
5459
5459
|
* @param details This parameter is currently unused.
|
|
5460
5460
|
* @return The `clearDefaultFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
|
5461
5461
|
*/
|
|
5462
|
-
export function clearDefaultFontSize(details?:
|
|
5462
|
+
export function clearDefaultFontSize(details?: unknown): Promise<void>;
|
|
5463
5463
|
/**
|
|
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:
|
|
5467
|
+
export function clearDefaultFontSize(callback: () => void): void;
|
|
5468
|
+
export function clearDefaultFontSize(details: unknown, 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,19 +5492,19 @@ 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.
|
|
5499
5499
|
* @return The `clearMinimumFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
|
5500
5500
|
*/
|
|
5501
|
-
export function clearMinimumFontSize(details?:
|
|
5501
|
+
export function clearMinimumFontSize(details?: unknown): Promise<void>;
|
|
5502
5502
|
/**
|
|
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:
|
|
5506
|
+
export function clearMinimumFontSize(callback: () => void): void;
|
|
5507
|
+
export function clearMinimumFontSize(details: unknown, 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).
|
|
@@ -5519,12 +5519,12 @@ export namespace Browser {
|
|
|
5519
5519
|
* @param details This parameter is currently unused.
|
|
5520
5520
|
* @return The `clearDefaultFixedFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
|
5521
5521
|
*/
|
|
5522
|
-
export function clearDefaultFixedFontSize(details:
|
|
5522
|
+
export function clearDefaultFixedFontSize(details: unknown): Promise<void>;
|
|
5523
5523
|
/**
|
|
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:
|
|
5527
|
+
export function clearDefaultFixedFontSize(details: unknown, callback: () => void): void;
|
|
5528
5528
|
|
|
5529
5529
|
/** Fired when the default fixed font size setting changes. */
|
|
5530
5530
|
export var onDefaultFixedFontSizeChanged: DefaultFixedFontSizeChangedEvent;
|
|
@@ -5553,12 +5553,12 @@ export namespace Browser {
|
|
|
5553
5553
|
/** Optional. Time-to-live of the message in seconds. If it is not possible to send the message within that time, an onSendError event will be raised. A time-to-live of 0 indicates that the message should be sent immediately or fail if it's not possible. The maximum and a default value of time-to-live is 86400 seconds (1 day). */
|
|
5554
5554
|
timeToLive?: number | undefined;
|
|
5555
5555
|
/** Message data to send to the server. Case-insensitive goog. and google, as well as case-sensitive collapse_key are disallowed as key prefixes. Sum of all key/value pairs should not exceed gcm.MAX_MESSAGE_SIZE. */
|
|
5556
|
-
data:
|
|
5556
|
+
data: { [key: string]: unknown };
|
|
5557
5557
|
}
|
|
5558
5558
|
|
|
5559
5559
|
export interface IncomingMessage {
|
|
5560
5560
|
/** The message data. */
|
|
5561
|
-
data:
|
|
5561
|
+
data: { [key: string]: unknown };
|
|
5562
5562
|
/**
|
|
5563
5563
|
* Optional.
|
|
5564
5564
|
* The sender who issued the message.
|
|
@@ -5578,7 +5578,7 @@ export namespace Browser {
|
|
|
5578
5578
|
/** Optional. The ID of the message with this error, if error is related to a specific message. */
|
|
5579
5579
|
messageId?: string | undefined;
|
|
5580
5580
|
/** Additional details related to the error, when available. */
|
|
5581
|
-
detail:
|
|
5581
|
+
detail: object;
|
|
5582
5582
|
}
|
|
5583
5583
|
|
|
5584
5584
|
export interface MessageReceptionEvent extends Browser.events.Event<(message: IncomingMessage) => void> {}
|
|
@@ -6247,7 +6247,7 @@ export namespace Browser {
|
|
|
6247
6247
|
}
|
|
6248
6248
|
|
|
6249
6249
|
export interface MenuItemParameters {
|
|
6250
|
-
items:
|
|
6250
|
+
items: MenuItem[];
|
|
6251
6251
|
engineId: string;
|
|
6252
6252
|
}
|
|
6253
6253
|
|
|
@@ -7188,7 +7188,7 @@ export namespace Browser {
|
|
|
7188
7188
|
* @since Chrome 29
|
|
7189
7189
|
* @param callback Returns the set of notification_ids currently in the system.
|
|
7190
7190
|
*/
|
|
7191
|
-
export function getAll(callback: (notifications:
|
|
7191
|
+
export function getAll(callback: (notifications: { [key: string]: true }) => void): void;
|
|
7192
7192
|
/**
|
|
7193
7193
|
* Retrieves whether the user has enabled notifications from this app or extension.
|
|
7194
7194
|
* @since Chrome 32
|
|
@@ -7628,7 +7628,7 @@ export namespace Browser {
|
|
|
7628
7628
|
*/
|
|
7629
7629
|
export function getKeyPair(
|
|
7630
7630
|
certificate: ArrayBuffer,
|
|
7631
|
-
parameters:
|
|
7631
|
+
parameters: { [key: string]: unknown },
|
|
7632
7632
|
callback: (publicKey: CryptoKey, privateKey: CryptoKey | null) => void,
|
|
7633
7633
|
): void;
|
|
7634
7634
|
/**
|
|
@@ -7642,7 +7642,7 @@ export namespace Browser {
|
|
|
7642
7642
|
*/
|
|
7643
7643
|
export function getKeyPairBySpki(
|
|
7644
7644
|
publicKeySpkiDer: ArrayBuffer,
|
|
7645
|
-
parameters:
|
|
7645
|
+
parameters: { [key: string]: unknown },
|
|
7646
7646
|
callback: (publicKey: CryptoKey, privateKey: CryptoKey | null) => void,
|
|
7647
7647
|
): void;
|
|
7648
7648
|
/** An implementation of WebCrypto's SubtleCrypto that allows crypto operations on keys of client certificates that are available to this extension. */
|
|
@@ -7718,7 +7718,7 @@ export namespace Browser {
|
|
|
7718
7718
|
/** The print job title. */
|
|
7719
7719
|
title: string;
|
|
7720
7720
|
/** Print ticket in CJT format. */
|
|
7721
|
-
ticket:
|
|
7721
|
+
ticket: { [key: string]: unknown };
|
|
7722
7722
|
/** The document content type. Supported formats are "application/pdf" and "image/pwg-raster". */
|
|
7723
7723
|
contentType: string;
|
|
7724
7724
|
/** Blob containing the document data to print. Format must match |contentType|. */
|
|
@@ -9510,7 +9510,7 @@ export namespace Browser {
|
|
|
9510
9510
|
*/
|
|
9511
9511
|
export function sendNativeMessage(
|
|
9512
9512
|
application: string,
|
|
9513
|
-
message:
|
|
9513
|
+
message: object,
|
|
9514
9514
|
responseCallback: (response: any) => void,
|
|
9515
9515
|
): void;
|
|
9516
9516
|
/**
|
|
@@ -9521,7 +9521,7 @@ export namespace Browser {
|
|
|
9521
9521
|
*/
|
|
9522
9522
|
export function sendNativeMessage(
|
|
9523
9523
|
application: string,
|
|
9524
|
-
message:
|
|
9524
|
+
message: object,
|
|
9525
9525
|
): Promise<any>;
|
|
9526
9526
|
/**
|
|
9527
9527
|
* Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and implement surveys. Maximum 255 characters.
|
|
@@ -10207,7 +10207,11 @@ export namespace Browser {
|
|
|
10207
10207
|
address: string;
|
|
10208
10208
|
}
|
|
10209
10209
|
|
|
10210
|
-
export function create(
|
|
10210
|
+
export function create(
|
|
10211
|
+
type: string,
|
|
10212
|
+
options?: { [key: string]: unknown },
|
|
10213
|
+
callback?: (createInfo: CreateInfo) => void,
|
|
10214
|
+
): void;
|
|
10211
10215
|
export function destroy(socketId: number): void;
|
|
10212
10216
|
export function connect(
|
|
10213
10217
|
socketId: number,
|
|
@@ -11692,7 +11696,7 @@ export namespace Browser {
|
|
|
11692
11696
|
* Closes a tab.
|
|
11693
11697
|
* @param tabId The tab to close.
|
|
11694
11698
|
*/
|
|
11695
|
-
export function remove(tabId: number, callback:
|
|
11699
|
+
export function remove(tabId: number, callback: () => void): void;
|
|
11696
11700
|
/**
|
|
11697
11701
|
* Closes several tabs.
|
|
11698
11702
|
* @param tabIds The list of tabs to close.
|
|
@@ -11703,7 +11707,7 @@ export namespace Browser {
|
|
|
11703
11707
|
* Closes several tabs.
|
|
11704
11708
|
* @param tabIds The list of tabs to close.
|
|
11705
11709
|
*/
|
|
11706
|
-
export function remove(tabIds: number[], callback:
|
|
11710
|
+
export function remove(tabIds: number[], callback: () => void): void;
|
|
11707
11711
|
/**
|
|
11708
11712
|
* Captures the visible area of the currently active tab in the specified window. You must have <all_urls> permission to use this method.
|
|
11709
11713
|
* @param callback
|
|
@@ -11883,7 +11887,7 @@ export namespace Browser {
|
|
|
11883
11887
|
* @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.
|
|
11884
11888
|
* @param callback Optional. Called when all the CSS has been inserted.
|
|
11885
11889
|
*/
|
|
11886
|
-
export function insertCSS(details: InjectDetails, callback:
|
|
11890
|
+
export function insertCSS(details: InjectDetails, callback: () => void): void;
|
|
11887
11891
|
/**
|
|
11888
11892
|
* Injects CSS into a page. For details, see the programmatic injection section of the content scripts doc.
|
|
11889
11893
|
* @param tabId Optional. The ID of the tab in which to insert the CSS; defaults to the active tab of the current window.
|
|
@@ -11897,7 +11901,7 @@ export namespace Browser {
|
|
|
11897
11901
|
* @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.
|
|
11898
11902
|
* @param callback Optional. Called when all the CSS has been inserted.
|
|
11899
11903
|
*/
|
|
11900
|
-
export function insertCSS(tabId: number, details: InjectDetails, callback:
|
|
11904
|
+
export function insertCSS(tabId: number, details: InjectDetails, callback: () => void): void;
|
|
11901
11905
|
/**
|
|
11902
11906
|
* Highlights the given tabs.
|
|
11903
11907
|
* @since Chrome 16
|
|
@@ -12842,7 +12846,7 @@ export namespace Browser {
|
|
|
12842
12846
|
export interface VpnConfigRemovalEvent extends Browser.events.Event<(id: string) => void> {}
|
|
12843
12847
|
|
|
12844
12848
|
export interface VpnConfigCreationEvent
|
|
12845
|
-
extends Browser.events.Event<(id: string, name: string, data:
|
|
12849
|
+
extends Browser.events.Event<(id: string, name: string, data: { [key: string]: unknown }) => void>
|
|
12846
12850
|
{}
|
|
12847
12851
|
|
|
12848
12852
|
export interface VpnUiEvent extends Browser.events.Event<(event: string, id?: string) => void> {}
|
|
@@ -12859,19 +12863,19 @@ export namespace Browser {
|
|
|
12859
12863
|
* @param id ID of the VPN configuration to destroy.
|
|
12860
12864
|
* @param callback Optional. Called when the configuration is destroyed or if there is an error.
|
|
12861
12865
|
*/
|
|
12862
|
-
export function destroyConfig(id: string, callback?:
|
|
12866
|
+
export function destroyConfig(id: string, callback?: () => void): void;
|
|
12863
12867
|
/**
|
|
12864
12868
|
* 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.
|
|
12865
12869
|
* @param parameters The parameters for the VPN session.
|
|
12866
12870
|
* @param callback Called when the parameters are set or if there is an error.
|
|
12867
12871
|
*/
|
|
12868
|
-
export function setParameters(parameters: VpnSessionParameters, callback
|
|
12872
|
+
export function setParameters(parameters: VpnSessionParameters, callback?: () => void): void;
|
|
12869
12873
|
/**
|
|
12870
12874
|
* 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.
|
|
12871
12875
|
* @param data The IP packet to be sent to the platform.
|
|
12872
12876
|
* @param callback Optional. Called when the packet is sent or if there is an error.
|
|
12873
12877
|
*/
|
|
12874
|
-
export function sendPacket(data: ArrayBuffer, callback?:
|
|
12878
|
+
export function sendPacket(data: ArrayBuffer, callback?: () => void): void;
|
|
12875
12879
|
/**
|
|
12876
12880
|
* Notifies the VPN session state to the platform. This will succeed only when the VPN session is owned by the extension.
|
|
12877
12881
|
* @param state The VPN session state of the VPN client.
|
|
@@ -12879,7 +12883,7 @@ export namespace Browser {
|
|
|
12879
12883
|
* failure: VPN connection failed.
|
|
12880
12884
|
* @param callback Optional. Called when the notification is complete or if there is an error.
|
|
12881
12885
|
*/
|
|
12882
|
-
export function notifyConnectionStateChanged(state: string, callback?:
|
|
12886
|
+
export function notifyConnectionStateChanged(state: string, callback?: () => void): void;
|
|
12883
12887
|
|
|
12884
12888
|
/** Triggered when a message is received from the platform for a VPN configuration owned by the extension. */
|
|
12885
12889
|
export var onPlatformMessage: VpnPlatformMessageEvent;
|
|
@@ -13152,7 +13156,7 @@ export namespace Browser {
|
|
|
13152
13156
|
* Manifest: "host_permissions"
|
|
13153
13157
|
*/
|
|
13154
13158
|
export namespace webRequest {
|
|
13155
|
-
interface WebRequestEvent<T extends
|
|
13159
|
+
interface WebRequestEvent<T extends (...args: any) => void, U extends string[]>
|
|
13156
13160
|
extends Omit<Browser.events.Event<T>, "addListener">
|
|
13157
13161
|
{
|
|
13158
13162
|
addListener(callback: T, filter: RequestFilter, extraInfoSpec?: U): void;
|
|
@@ -13409,7 +13413,7 @@ export namespace Browser {
|
|
|
13409
13413
|
* Can return its result via Promise in Manifest V3 or later since Chrome 116.
|
|
13410
13414
|
*/
|
|
13411
13415
|
export function handlerBehaviorChanged(): Promise<void>;
|
|
13412
|
-
export function handlerBehaviorChanged(callback:
|
|
13416
|
+
export function handlerBehaviorChanged(callback: () => void): void;
|
|
13413
13417
|
|
|
13414
13418
|
/** Fired when a request is about to occur. */
|
|
13415
13419
|
export const onBeforeRequest: WebRequestBodyEvent;
|
|
@@ -13743,7 +13747,7 @@ export namespace Browser {
|
|
|
13743
13747
|
*/
|
|
13744
13748
|
export function remove(windowId: number): Promise<void>;
|
|
13745
13749
|
/** Removes (closes) a window, and all the tabs inside it. */
|
|
13746
|
-
export function remove(windowId: number, callback:
|
|
13750
|
+
export function remove(windowId: number, callback: () => void): void;
|
|
13747
13751
|
/**
|
|
13748
13752
|
* Gets the window that was most recently focused — typically the window 'on top'.
|
|
13749
13753
|
*/
|
|
@@ -14570,7 +14574,7 @@ export namespace Browser {
|
|
|
14570
14574
|
export function isRegexSupported(regexOptions: RegexOptions): Promise<IsRegexSupportedResult>;
|
|
14571
14575
|
|
|
14572
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. */
|
|
14573
|
-
export function setExtensionActionOptions(options: ExtensionActionOptions, callback:
|
|
14577
|
+
export function setExtensionActionOptions(options: ExtensionActionOptions, callback: () => void): void;
|
|
14574
14578
|
|
|
14575
14579
|
/**
|
|
14576
14580
|
* 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.
|
|
@@ -14602,7 +14606,7 @@ export namespace Browser {
|
|
|
14602
14606
|
* In case of an error, runtime.lastError will be set and no change will be made to the rule set.
|
|
14603
14607
|
* This can happen for multiple reasons, such as invalid rule format, duplicate rule ID, rule count limit exceeded, internal errors, and others.
|
|
14604
14608
|
*/
|
|
14605
|
-
export function updateDynamicRules(options: UpdateRuleOptions, callback:
|
|
14609
|
+
export function updateDynamicRules(options: UpdateRuleOptions, callback: () => void): void;
|
|
14606
14610
|
|
|
14607
14611
|
/** Modifies the current set of dynamic rules for the extension.
|
|
14608
14612
|
* The rules with IDs listed in options.removeRuleIds are first removed, and then the rules given in options.addRules are added.
|
|
@@ -14628,7 +14632,7 @@ export namespace Browser {
|
|
|
14628
14632
|
* In case of an error, runtime.lastError will be set and no change will be made to set of enabled rulesets.
|
|
14629
14633
|
* This can happen for multiple reasons, such as invalid ruleset IDs, rule count limit exceeded, or internal errors.
|
|
14630
14634
|
*/
|
|
14631
|
-
export function updateEnabledRulesets(options: UpdateRulesetOptions, callback:
|
|
14635
|
+
export function updateEnabledRulesets(options: UpdateRulesetOptions, callback: () => void): void;
|
|
14632
14636
|
|
|
14633
14637
|
/** Updates the set of enabled static rulesets for the extension.
|
|
14634
14638
|
* The rulesets with IDs listed in options.disableRulesetIds are first removed, and then the rulesets listed in options.enableRulesetIds are added.
|
|
@@ -14653,7 +14657,7 @@ export namespace Browser {
|
|
|
14653
14657
|
* In case of an error, runtime.lastError will be set and no change will be made to the rule set.
|
|
14654
14658
|
* This can happen for multiple reasons, such as invalid rule format, duplicate rule ID, rule count limit exceeded, and others.
|
|
14655
14659
|
*/
|
|
14656
|
-
export function updateSessionRules(options: UpdateRuleOptions, callback:
|
|
14660
|
+
export function updateSessionRules(options: UpdateRuleOptions, callback: () => void): void;
|
|
14657
14661
|
|
|
14658
14662
|
/** Modifies the current set of session scoped rules for the extension.
|
|
14659
14663
|
* The rules with IDs listed in options.removeRuleIds are first removed, and then the rules given in options.addRules are added.
|