@types/chrome 0.0.260 → 0.0.261
Sign up to get free protection for your applications and to get access to all the features.
- chrome/README.md +1 -1
- chrome/index.d.ts +532 -505
- chrome/package.json +2 -2
chrome/index.d.ts
CHANGED
@@ -14,7 +14,7 @@ interface Window {
|
|
14
14
|
////////////////////
|
15
15
|
/**
|
16
16
|
* Use the chrome.accessibilityFeatures API to manage Chrome's accessibility features. This API relies on the ChromeSetting prototype of the type API for getting and setting individual accessibility features. In order to get feature states the extension must request accessibilityFeatures.read permission. For modifying feature state, the extension needs accessibilityFeatures.modify permission. Note that accessibilityFeatures.modify does not imply accessibilityFeatures.read permission.
|
17
|
-
*
|
17
|
+
* @since Chrome 37
|
18
18
|
* Permissions: "accessibilityFeatures.read"
|
19
19
|
* Important: This API works only on Chrome OS.
|
20
20
|
*/
|
@@ -36,35 +36,35 @@ declare namespace chrome.accessibilityFeatures {
|
|
36
36
|
/**
|
37
37
|
* **ChromeOS only.**
|
38
38
|
* Caret highlighting.
|
39
|
-
* @since Chrome 51
|
39
|
+
* @since Chrome 51
|
40
40
|
*/
|
41
41
|
export var caretHighlight: chrome.types.ChromeSetting;
|
42
42
|
/**
|
43
43
|
* **ChromeOS only.**
|
44
44
|
* Cursor highlighting.
|
45
|
-
* @since Chrome 51
|
45
|
+
* @since Chrome 51
|
46
46
|
*/
|
47
47
|
export var cursorHighlight: chrome.types.ChromeSetting;
|
48
48
|
/**
|
49
49
|
* **ChromeOS only.**
|
50
50
|
* Focus highlighting.
|
51
|
-
* @since Chrome 51
|
51
|
+
* @since Chrome 51
|
52
52
|
*/
|
53
53
|
export var focusHighlight: chrome.types.ChromeSetting;
|
54
54
|
/**
|
55
55
|
* **ChromeOS only.**
|
56
56
|
* Select-to-speak.
|
57
|
-
* @since Chrome 51
|
57
|
+
* @since Chrome 51
|
58
58
|
*/
|
59
59
|
export var selectToSpeak: chrome.types.ChromeSetting;
|
60
60
|
/**
|
61
61
|
* **ChromeOS only.**
|
62
62
|
* Switch Access.
|
63
|
-
* @since Chrome 51
|
63
|
+
* @since Chrome 51
|
64
64
|
*/
|
65
65
|
export var switchAccess: chrome.types.ChromeSetting;
|
66
66
|
/**
|
67
|
-
* @since Chrome 42
|
67
|
+
* @since Chrome 42
|
68
68
|
*/
|
69
69
|
export var animationPolicy: chrome.types.ChromeSetting;
|
70
70
|
}
|
@@ -74,7 +74,7 @@ declare namespace chrome.accessibilityFeatures {
|
|
74
74
|
////////////////////
|
75
75
|
/**
|
76
76
|
* Use the chrome.action API to control the extension's icon in the Google Chrome toolbar.
|
77
|
-
*
|
77
|
+
* @since Chrome 88, MV3
|
78
78
|
* Manifest: "action": {...}
|
79
79
|
*/
|
80
80
|
declare namespace chrome.action {
|
@@ -138,7 +138,7 @@ declare namespace chrome.action {
|
|
138
138
|
}
|
139
139
|
|
140
140
|
/**
|
141
|
-
*
|
141
|
+
* @since Chrome 88
|
142
142
|
* Disables the action for a tab.
|
143
143
|
* @param tabId The id of the tab for which you want to modify the action.
|
144
144
|
* @return The `disable` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
@@ -146,7 +146,7 @@ declare namespace chrome.action {
|
|
146
146
|
export function disable(tabId?: number): Promise<void>;
|
147
147
|
|
148
148
|
/**
|
149
|
-
*
|
149
|
+
* @since Chrome 88
|
150
150
|
* Disables the action for a tab.
|
151
151
|
* @param tabId The id of the tab for which you want to modify the action.
|
152
152
|
* @param callback
|
@@ -155,7 +155,7 @@ declare namespace chrome.action {
|
|
155
155
|
export function disable(tabId: number, callback: () => void): void;
|
156
156
|
|
157
157
|
/**
|
158
|
-
*
|
158
|
+
* @since Chrome 88
|
159
159
|
* Enables the action for a tab. By default, actions are enabled.
|
160
160
|
* @param tabId The id of the tab for which you want to modify the action.
|
161
161
|
* @return The `enable` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
@@ -163,7 +163,7 @@ declare namespace chrome.action {
|
|
163
163
|
export function enable(tabId?: number): Promise<void>;
|
164
164
|
|
165
165
|
/**
|
166
|
-
*
|
166
|
+
* @since Chrome 88
|
167
167
|
* Enables the action for a tab. By default, actions are enabled.
|
168
168
|
* @param tabId The id of the tab for which you want to modify the action.
|
169
169
|
* @param callback
|
@@ -172,19 +172,19 @@ declare namespace chrome.action {
|
|
172
172
|
export function enable(tabId: number, callback: () => void): void;
|
173
173
|
|
174
174
|
/**
|
175
|
-
*
|
175
|
+
* @since Chrome 88
|
176
176
|
* Gets the background color of the action.
|
177
177
|
*/
|
178
178
|
export function getBadgeBackgroundColor(details: TabDetails, callback: (result: ColorArray) => void): void;
|
179
179
|
/**
|
180
|
-
*
|
180
|
+
* @since Chrome 88
|
181
181
|
* Gets the background color of the action.
|
182
182
|
* @return The `getBadgeBackgroundColor` method provides its result via callback or returned as a `Promise` (MV3 only).
|
183
183
|
*/
|
184
184
|
export function getBadgeBackgroundColor(details: TabDetails): Promise<ColorArray>;
|
185
185
|
|
186
186
|
/**
|
187
|
-
*
|
187
|
+
* @since Chrome 88
|
188
188
|
* Gets the badge text of the action. If no tab is specified, the non-tab-specific badge text is returned.
|
189
189
|
* If displayActionCountAsBadgeText is enabled, a placeholder text will be returned unless the
|
190
190
|
* declarativeNetRequestFeedback permission is present or tab-specific badge text was provided.
|
@@ -192,7 +192,7 @@ declare namespace chrome.action {
|
|
192
192
|
export function getBadgeText(details: TabDetails, callback: (result: string) => void): void;
|
193
193
|
|
194
194
|
/**
|
195
|
-
*
|
195
|
+
* @since Chrome 88
|
196
196
|
* Gets the badge text of the action. If no tab is specified, the non-tab-specific badge text is returned.
|
197
197
|
* If displayActionCountAsBadgeText is enabled, a placeholder text will be returned unless the
|
198
198
|
* declarativeNetRequestFeedback permission is present or tab-specific badge text was provided.
|
@@ -201,72 +201,72 @@ declare namespace chrome.action {
|
|
201
201
|
export function getBadgeText(details: TabDetails): Promise<string>;
|
202
202
|
|
203
203
|
/**
|
204
|
-
*
|
204
|
+
* @since Chrome 110
|
205
205
|
* Gets the text color of the action.
|
206
206
|
*/
|
207
207
|
export function getBadgeTextColor(details: TabDetails, callback: (result: ColorArray) => void): void;
|
208
208
|
|
209
209
|
/**
|
210
|
-
*
|
210
|
+
* @since Chrome 110
|
211
211
|
* Gets the text color of the action.
|
212
212
|
* @return The `getBadgeTextColor` method provides its result via callback or returned as a `Promise` (MV3 only).
|
213
213
|
*/
|
214
214
|
export function getBadgeTextColor(details: TabDetails): Promise<ColorArray>;
|
215
215
|
|
216
216
|
/**
|
217
|
-
*
|
217
|
+
* @since Chrome 88
|
218
218
|
* Gets the html document set as the popup for this action.
|
219
219
|
*/
|
220
220
|
export function getPopup(details: TabDetails, callback: (result: string) => void): void;
|
221
221
|
|
222
222
|
/**
|
223
|
-
*
|
223
|
+
* @since Chrome 88
|
224
224
|
* Gets the html document set as the popup for this action.
|
225
225
|
* @return The `getPopup` method provides its result via callback or returned as a `Promise` (MV3 only).
|
226
226
|
*/
|
227
227
|
export function getPopup(details: TabDetails): Promise<string>;
|
228
228
|
|
229
229
|
/**
|
230
|
-
*
|
230
|
+
* @since Chrome 88
|
231
231
|
* Gets the title of the action.
|
232
232
|
*/
|
233
233
|
export function getTitle(details: TabDetails, callback: (result: string) => void): void;
|
234
234
|
|
235
235
|
/**
|
236
|
-
*
|
236
|
+
* @since Chrome 88
|
237
237
|
* Gets the title of the action.
|
238
238
|
* @return The `getTitle` method provides its result via callback or returned as a `Promise` (MV3 only).
|
239
239
|
*/
|
240
240
|
export function getTitle(details: TabDetails): Promise<string>;
|
241
241
|
|
242
242
|
/**
|
243
|
-
*
|
243
|
+
* @since Chrome 91
|
244
244
|
* Returns the user-specified settings relating to an extension's action.
|
245
245
|
*/
|
246
246
|
export function getUserSettings(callback: (userSettings: UserSettings) => void): void;
|
247
247
|
|
248
248
|
/**
|
249
|
-
*
|
249
|
+
* @since Chrome 91
|
250
250
|
* Returns the user-specified settings relating to an extension's action.
|
251
251
|
* @return The `getUserSettings` method provides its result via callback or returned as a `Promise` (MV3 only).
|
252
252
|
*/
|
253
253
|
export function getUserSettings(): Promise<UserSettings>;
|
254
254
|
|
255
255
|
/**
|
256
|
-
*
|
256
|
+
* @since Chrome 110
|
257
257
|
* Indicates whether the extension action is enabled for a tab (or globally if no tabId is provided). Actions enabled using only declarativeContent always return false.
|
258
258
|
*/
|
259
259
|
export function isEnabled(tabId: number | undefined, callback: (isEnabled: boolean) => void): void;
|
260
260
|
|
261
261
|
/**
|
262
|
-
*
|
262
|
+
* @since Chrome 110
|
263
263
|
* Indicates whether the extension action is enabled for a tab (or globally if no tabId is provided). Actions enabled using only declarativeContent always return false.
|
264
264
|
* @return True if the extension action is enabled.
|
265
265
|
*/
|
266
266
|
export function isEnabled(tabId?: number): Promise<boolean>;
|
267
267
|
|
268
268
|
/**
|
269
|
-
*
|
269
|
+
* @since Chrome 99
|
270
270
|
* Opens the extension's popup.
|
271
271
|
* @param options Specifies options for opening the popup.
|
272
272
|
* () => {...}
|
@@ -275,7 +275,7 @@ declare namespace chrome.action {
|
|
275
275
|
export function openPopup(options?: OpenPopupOptions): Promise<void>;
|
276
276
|
|
277
277
|
/**
|
278
|
-
*
|
278
|
+
* @since Chrome 99
|
279
279
|
* Opens the extension's popup.
|
280
280
|
* @param options Specifies options for opening the popup.
|
281
281
|
*/
|
@@ -283,46 +283,46 @@ declare namespace chrome.action {
|
|
283
283
|
export function openPopup(options: OpenPopupOptions, callback: () => void): void;
|
284
284
|
|
285
285
|
/**
|
286
|
-
*
|
286
|
+
* @since Chrome 88
|
287
287
|
* Sets the background color for the badge.
|
288
288
|
* @return The `setBadgeBackgroundColor` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
289
289
|
*/
|
290
290
|
export function setBadgeBackgroundColor(details: BadgeColorDetails): Promise<void>;
|
291
291
|
|
292
292
|
/**
|
293
|
-
*
|
293
|
+
* @since Chrome 88
|
294
294
|
* Sets the background color for the badge.
|
295
295
|
*/
|
296
296
|
export function setBadgeBackgroundColor(details: BadgeColorDetails, callback: () => void): void;
|
297
297
|
|
298
298
|
/**
|
299
|
-
*
|
299
|
+
* @since Chrome 88
|
300
300
|
* Sets the badge text for the action. The badge is displayed on top of the icon.
|
301
301
|
* @return The `setBadgeText` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
302
302
|
*/
|
303
303
|
export function setBadgeText(details: BadgeTextDetails): Promise<void>;
|
304
304
|
|
305
305
|
/**
|
306
|
-
*
|
306
|
+
* @since Chrome 88
|
307
307
|
* Sets the badge text for the action. The badge is displayed on top of the icon.
|
308
308
|
*/
|
309
309
|
export function setBadgeText(details: BadgeTextDetails, callback: () => void): void;
|
310
310
|
|
311
311
|
/**
|
312
|
-
*
|
312
|
+
* @since Chrome 110
|
313
313
|
* Sets the text color for the badge.
|
314
314
|
* @return The `setBadgeTextColor` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
315
315
|
*/
|
316
316
|
export function setBadgeTextColor(details: BadgeColorDetails): Promise<void>;
|
317
317
|
|
318
318
|
/**
|
319
|
-
*
|
319
|
+
* @since Chrome 100
|
320
320
|
* Sets the text color for the badge.
|
321
321
|
*/
|
322
322
|
export function setBadgeTextColor(details: BadgeColorDetails, callback: () => void): void;
|
323
323
|
|
324
324
|
/**
|
325
|
-
*
|
325
|
+
* @since Chrome 88
|
326
326
|
* Sets the icon for the action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element,
|
327
327
|
* or as dictionary of either one of those. Either the path or the imageData property must be specified.
|
328
328
|
* @return The `setIcon` method provides its result via callback or returned as a `Promise` (MV3 only). Since Chrome 96.
|
@@ -331,27 +331,27 @@ declare namespace chrome.action {
|
|
331
331
|
export function setIcon(details: TabIconDetails, callback: () => void): void;
|
332
332
|
|
333
333
|
/**
|
334
|
-
*
|
334
|
+
* @since Chrome 88
|
335
335
|
* Sets the html document to be opened as a popup when the user clicks on the action's icon.
|
336
336
|
* @return The `setPopup` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
337
337
|
*/
|
338
338
|
export function setPopup(details: PopupDetails): Promise<void>;
|
339
339
|
|
340
340
|
/**
|
341
|
-
*
|
341
|
+
* @since Chrome 88
|
342
342
|
* Sets the html document to be opened as a popup when the user clicks on the action's icon.
|
343
343
|
*/
|
344
344
|
export function setPopup(details: PopupDetails, callback: () => void): void;
|
345
345
|
|
346
346
|
/**
|
347
|
-
*
|
347
|
+
* @since Chrome 88
|
348
348
|
* Sets the title of the action. This shows up in the tooltip.
|
349
349
|
* @return The `setTitle` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
350
350
|
*/
|
351
351
|
export function setTitle(details: TitleDetails): Promise<void>;
|
352
352
|
|
353
353
|
/**
|
354
|
-
*
|
354
|
+
* @since Chrome 88
|
355
355
|
* Sets the title of the action. This shows up in the tooltip.
|
356
356
|
*/
|
357
357
|
export function setTitle(details: TitleDetails, callback: () => void): void;
|
@@ -365,7 +365,7 @@ declare namespace chrome.action {
|
|
365
365
|
////////////////////
|
366
366
|
/**
|
367
367
|
* Use the chrome.alarms API to schedule code to run periodically or at a specified time in the future.
|
368
|
-
*
|
368
|
+
* @since Chrome 22
|
369
369
|
* Permissions: "alarms"
|
370
370
|
*/
|
371
371
|
declare namespace chrome.alarms {
|
@@ -492,6 +492,7 @@ declare namespace chrome.alarms {
|
|
492
492
|
/**
|
493
493
|
* Use the chrome.browser API to interact with the Chrome browser associated with
|
494
494
|
* the current application and Chrome profile.
|
495
|
+
* @deprecated Part of the deprecated Chrome Apps platform
|
495
496
|
*/
|
496
497
|
declare namespace chrome.browser {
|
497
498
|
export interface Options {
|
@@ -512,7 +513,8 @@ declare namespace chrome.browser {
|
|
512
513
|
/**
|
513
514
|
* Opens a new tab in a browser window associated with the current application
|
514
515
|
* and Chrome profile. If no browser window for the Chrome profile is opened,
|
515
|
-
* a new one is opened prior to creating the new tab.
|
516
|
+
* a new one is opened prior to creating the new tab.
|
517
|
+
* @since Chrome 42
|
516
518
|
* @param options Configures how the tab should be opened.
|
517
519
|
*/
|
518
520
|
export function openTab(options: Options): void;
|
@@ -523,7 +525,7 @@ declare namespace chrome.browser {
|
|
523
525
|
////////////////////
|
524
526
|
/**
|
525
527
|
* Use the chrome.bookmarks API to create, organize, and otherwise manipulate bookmarks. Also see Override Pages, which you can use to create a custom Bookmark Manager page.
|
526
|
-
*
|
528
|
+
* @since Chrome 5
|
527
529
|
* Permissions: "bookmarks"
|
528
530
|
*/
|
529
531
|
declare namespace chrome.bookmarks {
|
@@ -547,7 +549,7 @@ declare namespace chrome.bookmarks {
|
|
547
549
|
children?: BookmarkTreeNode[] | undefined;
|
548
550
|
/**
|
549
551
|
* Optional.
|
550
|
-
*
|
552
|
+
* @since Chrome 37
|
551
553
|
* 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).
|
552
554
|
*/
|
553
555
|
unmodifiable?: "managed" | undefined;
|
@@ -750,13 +752,13 @@ declare namespace chrome.bookmarks {
|
|
750
752
|
*/
|
751
753
|
export function getChildren(id: string): Promise<BookmarkTreeNode[]>;
|
752
754
|
/**
|
753
|
-
*
|
755
|
+
* @since Chrome 14
|
754
756
|
* Retrieves part of the Bookmarks hierarchy, starting at the specified node.
|
755
757
|
* @param id The ID of the root of the subtree to retrieve.
|
756
758
|
*/
|
757
759
|
export function getSubTree(id: string, callback: (results: BookmarkTreeNode[]) => void): void;
|
758
760
|
/**
|
759
|
-
*
|
761
|
+
* @since Chrome 14
|
760
762
|
* Retrieves part of the Bookmarks hierarchy, starting at the specified node.
|
761
763
|
* @param id The ID of the root of the subtree to retrieve.
|
762
764
|
* @return The `getSubTree` method provides its result via callback or returned as a `Promise` (MV3 only).
|
@@ -793,7 +795,7 @@ declare namespace chrome.bookmarks {
|
|
793
795
|
////////////////////
|
794
796
|
/**
|
795
797
|
* Use browser actions to put icons in the main Google Chrome toolbar, to the right of the address bar. In addition to its icon, a browser action can also have a tooltip, a badge, and a popup.
|
796
|
-
*
|
798
|
+
* @since Chrome 5
|
797
799
|
* Manifest: "browser_action": {...}
|
798
800
|
*/
|
799
801
|
declare namespace chrome.browserAction {
|
@@ -844,14 +846,14 @@ declare namespace chrome.browserAction {
|
|
844
846
|
export interface BrowserClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {}
|
845
847
|
|
846
848
|
/**
|
847
|
-
*
|
849
|
+
* @since Chrome 22
|
848
850
|
* Enables the browser action for a tab. By default, browser actions are enabled.
|
849
851
|
* @param tabId The id of the tab for which you want to modify the browser action.
|
850
852
|
* @return The `enable` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
851
853
|
*/
|
852
854
|
export function enable(tabId?: number | null): Promise<void>;
|
853
855
|
/**
|
854
|
-
*
|
856
|
+
* @since Chrome 22
|
855
857
|
* Enables the browser action for a tab. By default, browser actions are enabled.
|
856
858
|
* @param tabId The id of the tab for which you want to modify the browser action.
|
857
859
|
* @param callback Supported since Chrome 67
|
@@ -889,13 +891,13 @@ declare namespace chrome.browserAction {
|
|
889
891
|
*/
|
890
892
|
export function setTitle(details: TitleDetails, callback: () => void): void;
|
891
893
|
/**
|
892
|
-
*
|
894
|
+
* @since Chrome 19
|
893
895
|
* Gets the badge text of the browser action. If no tab is specified, the non-tab-specific badge text is returned.
|
894
896
|
* @param callback Supported since Chrome 67
|
895
897
|
*/
|
896
898
|
export function getBadgeText(details: TabDetails, callback: (result: string) => void): void;
|
897
899
|
/**
|
898
|
-
*
|
900
|
+
* @since Chrome 19
|
899
901
|
* Gets the badge text of the browser action. If no tab is specified, the non-tab-specific badge text is returned.
|
900
902
|
* @return The `getBadgeText` method provides its result via callback or returned as a `Promise` (MV3 only).
|
901
903
|
*/
|
@@ -911,14 +913,14 @@ declare namespace chrome.browserAction {
|
|
911
913
|
*/
|
912
914
|
export function setPopup(details: PopupDetails, callback?: () => void): void;
|
913
915
|
/**
|
914
|
-
*
|
916
|
+
* @since Chrome 22
|
915
917
|
* Disables the browser action for a tab.
|
916
918
|
* @param tabId The id of the tab for which you want to modify the browser action.
|
917
919
|
* @return The `disable` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
918
920
|
*/
|
919
921
|
export function disable(tabId?: number | null): Promise<void>;
|
920
922
|
/**
|
921
|
-
*
|
923
|
+
* @since Chrome 22
|
922
924
|
* Disables the browser action for a tab.
|
923
925
|
* @param tabId The id of the tab for which you want to modify the browser action.
|
924
926
|
* @param callback Supported since Chrome 67
|
@@ -926,34 +928,34 @@ declare namespace chrome.browserAction {
|
|
926
928
|
export function disable(callback: () => void): void;
|
927
929
|
export function disable(tabId?: number | null, callback?: () => void): void;
|
928
930
|
/**
|
929
|
-
*
|
931
|
+
* @since Chrome 19
|
930
932
|
* Gets the title of the browser action.
|
931
933
|
*/
|
932
934
|
export function getTitle(details: TabDetails, callback: (result: string) => void): void;
|
933
935
|
/**
|
934
|
-
*
|
936
|
+
* @since Chrome 19
|
935
937
|
* Gets the title of the browser action.
|
936
938
|
* @return The `getTitle` method provides its result via callback or returned as a `Promise` (MV3 only).
|
937
939
|
*/
|
938
940
|
export function getTitle(details: TabDetails): Promise<string>;
|
939
941
|
/**
|
940
|
-
*
|
942
|
+
* @since Chrome 19
|
941
943
|
* Gets the background color of the browser action.
|
942
944
|
*/
|
943
945
|
export function getBadgeBackgroundColor(details: TabDetails, callback: (result: ColorArray) => void): void;
|
944
946
|
/**
|
945
|
-
*
|
947
|
+
* @since Chrome 19
|
946
948
|
* Gets the background color of the browser action.
|
947
949
|
* @return The `getBadgeBackgroundColor` method provides its result via callback or returned as a `Promise` (MV3 only).
|
948
950
|
*/
|
949
951
|
export function getBadgeBackgroundColor(details: TabDetails): Promise<ColorArray>;
|
950
952
|
/**
|
951
|
-
*
|
953
|
+
* @since Chrome 19
|
952
954
|
* Gets the html document set as the popup for this browser action.
|
953
955
|
*/
|
954
956
|
export function getPopup(details: TabDetails, callback: (result: string) => void): void;
|
955
957
|
/**
|
956
|
-
*
|
958
|
+
* @since Chrome 19
|
957
959
|
* Gets the html document set as the popup for this browser action.
|
958
960
|
* @return The `getPopup` method provides its result via callback or returned as a `Promise` (MV3 only).
|
959
961
|
*/
|
@@ -972,7 +974,7 @@ declare namespace chrome.browserAction {
|
|
972
974
|
////////////////////
|
973
975
|
/**
|
974
976
|
* Use the chrome.browsingData API to remove browsing data from a user's local profile.
|
975
|
-
*
|
977
|
+
* @since Chrome 19
|
976
978
|
* Permissions: "browsingData"
|
977
979
|
*/
|
978
980
|
declare namespace chrome.browsingData {
|
@@ -989,7 +991,7 @@ declare namespace chrome.browsingData {
|
|
989
991
|
export interface RemovalOptions {
|
990
992
|
/**
|
991
993
|
* Optional.
|
992
|
-
*
|
994
|
+
* @since Chrome 74
|
993
995
|
* When present, data for origins in this list is excluded from deletion. Can't be used together with origins. Only supported for cookies, storage and cache. Cookies are excluded for the whole registrable domain.
|
994
996
|
*/
|
995
997
|
excludeOrigins?: string[] | undefined;
|
@@ -1000,7 +1002,7 @@ declare namespace chrome.browsingData {
|
|
1000
1002
|
originTypes?: OriginTypes | undefined;
|
1001
1003
|
/**
|
1002
1004
|
* Optional.
|
1003
|
-
*
|
1005
|
+
* @since Chrome 74
|
1004
1006
|
* When present, only data for origins in this list is deleted. Only supported for cookies, storage and cache. Cookies are cleared for the whole registrable domain.
|
1005
1007
|
*/
|
1006
1008
|
origins?: string[] | undefined;
|
@@ -1012,7 +1014,7 @@ declare namespace chrome.browsingData {
|
|
1012
1014
|
}
|
1013
1015
|
|
1014
1016
|
/**
|
1015
|
-
*
|
1017
|
+
* @since Chrome 27
|
1016
1018
|
* A set of data types. Missing data types are interpreted as false.
|
1017
1019
|
*/
|
1018
1020
|
export interface DataTypeSet {
|
@@ -1056,7 +1058,7 @@ declare namespace chrome.browsingData {
|
|
1056
1058
|
history?: boolean | undefined;
|
1057
1059
|
/**
|
1058
1060
|
* Optional.
|
1059
|
-
*
|
1061
|
+
* @since Chrome 39
|
1060
1062
|
* Service Workers.
|
1061
1063
|
*/
|
1062
1064
|
serviceWorkers?: boolean | undefined;
|
@@ -1071,13 +1073,13 @@ declare namespace chrome.browsingData {
|
|
1071
1073
|
}
|
1072
1074
|
|
1073
1075
|
/**
|
1074
|
-
*
|
1076
|
+
* @since Chrome 26
|
1075
1077
|
* Reports which types of data are currently selected in the 'Clear browsing data' settings UI. Note: some of the data types included in this API are not available in the settings UI, and some UI settings control more than one data type listed here.
|
1076
1078
|
* @return The `settings` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
1077
1079
|
*/
|
1078
1080
|
export function settings(): Promise<SettingsResult>;
|
1079
1081
|
/**
|
1080
|
-
*
|
1082
|
+
* @since Chrome 26
|
1081
1083
|
* Reports which types of data are currently selected in the 'Clear browsing data' settings UI. Note: some of the data types included in this API are not available in the settings UI, and some UI settings control more than one data type listed here.
|
1082
1084
|
*/
|
1083
1085
|
export function settings(callback: (result: SettingsResult) => void): void;
|
@@ -1098,13 +1100,13 @@ declare namespace chrome.browsingData {
|
|
1098
1100
|
*/
|
1099
1101
|
export function removePluginData(options: RemovalOptions, callback: () => void): void;
|
1100
1102
|
/**
|
1101
|
-
*
|
1103
|
+
* @since Chrome 72
|
1102
1104
|
* Clears websites' service workers.
|
1103
1105
|
* @return The `removeServiceWorkers` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
1104
1106
|
*/
|
1105
1107
|
export function removeServiceWorkers(options: RemovalOptions): Promise<void>;
|
1106
1108
|
/**
|
1107
|
-
*
|
1109
|
+
* @since Chrome 72
|
1108
1110
|
* Clears websites' service workers.
|
1109
1111
|
* @param callback Called when the browser's service workers have been cleared.
|
1110
1112
|
*/
|
@@ -1246,7 +1248,7 @@ declare namespace chrome.browsingData {
|
|
1246
1248
|
////////////////////
|
1247
1249
|
/**
|
1248
1250
|
* Use the commands API to add keyboard shortcuts that trigger actions in your extension, for example, an action to open the browser action or send a command to the extension.
|
1249
|
-
*
|
1251
|
+
* @since Chrome 25
|
1250
1252
|
* Manifest: "commands": {...}
|
1251
1253
|
*/
|
1252
1254
|
declare namespace chrome.commands {
|
@@ -1281,7 +1283,7 @@ declare namespace chrome.commands {
|
|
1281
1283
|
////////////////////
|
1282
1284
|
/**
|
1283
1285
|
* Use the chrome.contentSettings API to change settings that control whether websites can use features such as cookies, JavaScript, and plugins. More generally speaking, content settings allow you to customize Chrome's behavior on a per-site basis instead of globally.
|
1284
|
-
*
|
1286
|
+
* @since Chrome 16
|
1285
1287
|
* Permissions: "contentSettings"
|
1286
1288
|
*/
|
1287
1289
|
declare namespace chrome.contentSettings {
|
@@ -1529,7 +1531,7 @@ declare namespace chrome.contentSettings {
|
|
1529
1531
|
*/
|
1530
1532
|
export var images: ImagesContentSetting;
|
1531
1533
|
/**
|
1532
|
-
*
|
1534
|
+
* @since Chrome 42
|
1533
1535
|
* Whether to allow Geolocation. One of
|
1534
1536
|
* allow: Allow sites to track your physical location,
|
1535
1537
|
* block: Don't allow sites to track your physical location,
|
@@ -1539,7 +1541,7 @@ declare namespace chrome.contentSettings {
|
|
1539
1541
|
*/
|
1540
1542
|
export var location: LocationContentSetting;
|
1541
1543
|
/**
|
1542
|
-
*
|
1544
|
+
* @since Chrome 42
|
1543
1545
|
* Whether to allow sites to toggle the fullscreen mode. One of
|
1544
1546
|
* allow: Allow sites to toggle the fullscreen mode,
|
1545
1547
|
* ask: Ask when a site wants to toggle the fullscreen mode.
|
@@ -1548,7 +1550,7 @@ declare namespace chrome.contentSettings {
|
|
1548
1550
|
*/
|
1549
1551
|
export var fullscreen: FullscreenContentSetting;
|
1550
1552
|
/**
|
1551
|
-
*
|
1553
|
+
* @since Chrome 42
|
1552
1554
|
* Whether to allow sites to disable the mouse cursor. One of
|
1553
1555
|
* allow: Allow sites to disable the mouse cursor,
|
1554
1556
|
* block: Don't allow sites to disable the mouse cursor,
|
@@ -1558,7 +1560,7 @@ declare namespace chrome.contentSettings {
|
|
1558
1560
|
*/
|
1559
1561
|
export var mouselock: MouselockContentSetting;
|
1560
1562
|
/**
|
1561
|
-
*
|
1563
|
+
* @since Chrome 46
|
1562
1564
|
* Whether to allow sites to access the microphone. One of
|
1563
1565
|
* allow: Allow sites to access the microphone,
|
1564
1566
|
* block: Don't allow sites to access the microphone,
|
@@ -1569,7 +1571,7 @@ declare namespace chrome.contentSettings {
|
|
1569
1571
|
*/
|
1570
1572
|
export var microphone: MicrophoneContentSetting;
|
1571
1573
|
/**
|
1572
|
-
*
|
1574
|
+
* @since Chrome 46
|
1573
1575
|
* Whether to allow sites to access the camera. One of
|
1574
1576
|
* allow: Allow sites to access the camera,
|
1575
1577
|
* block: Don't allow sites to access the camera,
|
@@ -1580,7 +1582,7 @@ declare namespace chrome.contentSettings {
|
|
1580
1582
|
*/
|
1581
1583
|
export var camera: CameraContentSetting;
|
1582
1584
|
/**
|
1583
|
-
*
|
1585
|
+
* @since Chrome 42
|
1584
1586
|
* Whether to allow sites to run plugins unsandboxed. One of
|
1585
1587
|
* allow: Allow sites to run plugins unsandboxed,
|
1586
1588
|
* block: Don't allow sites to run plugins unsandboxed,
|
@@ -1590,7 +1592,7 @@ declare namespace chrome.contentSettings {
|
|
1590
1592
|
*/
|
1591
1593
|
export var unsandboxedPlugins: PpapiBrokerContentSetting;
|
1592
1594
|
/**
|
1593
|
-
*
|
1595
|
+
* @since Chrome 42
|
1594
1596
|
* Whether to allow sites to download multiple files automatically. One of
|
1595
1597
|
* allow: Allow sites to download multiple files automatically,
|
1596
1598
|
* block: Don't allow sites to download multiple files automatically,
|
@@ -1606,78 +1608,78 @@ declare namespace chrome.contentSettings {
|
|
1606
1608
|
////////////////////
|
1607
1609
|
/**
|
1608
1610
|
* Use the chrome.contextMenus API to add items to Google Chrome's context menu. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages.
|
1609
|
-
*
|
1611
|
+
* @since Chrome 6
|
1610
1612
|
* Permissions: "contextMenus"
|
1611
1613
|
*/
|
1612
1614
|
declare namespace chrome.contextMenus {
|
1613
1615
|
export interface OnClickData {
|
1614
1616
|
/**
|
1615
1617
|
* Optional.
|
1616
|
-
*
|
1618
|
+
* @since Chrome 35
|
1617
1619
|
* The text for the context selection, if any.
|
1618
1620
|
*/
|
1619
1621
|
selectionText?: string | undefined;
|
1620
1622
|
/**
|
1621
1623
|
* Optional.
|
1622
|
-
*
|
1624
|
+
* @since Chrome 35
|
1623
1625
|
* A flag indicating the state of a checkbox or radio item after it is clicked.
|
1624
1626
|
*/
|
1625
1627
|
checked?: boolean | undefined;
|
1626
1628
|
/**
|
1627
|
-
*
|
1629
|
+
* @since Chrome 35
|
1628
1630
|
* The ID of the menu item that was clicked.
|
1629
1631
|
*/
|
1630
1632
|
menuItemId: number | string;
|
1631
1633
|
/**
|
1632
1634
|
* Optional.
|
1633
|
-
*
|
1635
|
+
* @since Chrome 35
|
1634
1636
|
* The ID of the frame of the element where the context menu was
|
1635
1637
|
* clicked, if it was in a frame.
|
1636
1638
|
*/
|
1637
1639
|
frameId?: number | undefined;
|
1638
1640
|
/**
|
1639
1641
|
* Optional.
|
1640
|
-
*
|
1642
|
+
* @since Chrome 35
|
1641
1643
|
* The URL of the frame of the element where the context menu was clicked, if it was in a frame.
|
1642
1644
|
*/
|
1643
1645
|
frameUrl?: string | undefined;
|
1644
1646
|
/**
|
1645
|
-
*
|
1647
|
+
* @since Chrome 35
|
1646
1648
|
* A flag indicating whether the element is editable (text input, textarea, etc.).
|
1647
1649
|
*/
|
1648
1650
|
editable: boolean;
|
1649
1651
|
/**
|
1650
1652
|
* Optional.
|
1651
|
-
*
|
1653
|
+
* @since Chrome 35
|
1652
1654
|
* One of 'image', 'video', or 'audio' if the context menu was activated on one of these types of elements.
|
1653
1655
|
*/
|
1654
1656
|
mediaType?: "image" | "video" | "audio" | undefined;
|
1655
1657
|
/**
|
1656
1658
|
* Optional.
|
1657
|
-
*
|
1659
|
+
* @since Chrome 35
|
1658
1660
|
* A flag indicating the state of a checkbox or radio item before it was clicked.
|
1659
1661
|
*/
|
1660
1662
|
wasChecked?: boolean | undefined;
|
1661
1663
|
/**
|
1662
|
-
*
|
1664
|
+
* @since Chrome 35
|
1663
1665
|
* The URL of the page where the menu item was clicked. This property is not set if the click occurred in a context where there is no current page, such as in a launcher context menu.
|
1664
1666
|
*/
|
1665
1667
|
pageUrl: string;
|
1666
1668
|
/**
|
1667
1669
|
* Optional.
|
1668
|
-
*
|
1670
|
+
* @since Chrome 35
|
1669
1671
|
* If the element is a link, the URL it points to.
|
1670
1672
|
*/
|
1671
1673
|
linkUrl?: string | undefined;
|
1672
1674
|
/**
|
1673
1675
|
* Optional.
|
1674
|
-
*
|
1676
|
+
* @since Chrome 35
|
1675
1677
|
* The parent ID, if any, for the item clicked.
|
1676
1678
|
*/
|
1677
1679
|
parentMenuItemId?: number | string;
|
1678
1680
|
/**
|
1679
1681
|
* Optional.
|
1680
|
-
*
|
1682
|
+
* @since Chrome 35
|
1681
1683
|
* Will be present for elements with a 'src' URL.
|
1682
1684
|
*/
|
1683
1685
|
srcUrl?: string | undefined;
|
@@ -1711,7 +1713,7 @@ declare namespace chrome.contextMenus {
|
|
1711
1713
|
contexts?: ContextType | ContextType[] | undefined;
|
1712
1714
|
/**
|
1713
1715
|
* Optional.
|
1714
|
-
*
|
1716
|
+
* @since Chrome 20
|
1715
1717
|
* Whether this context menu item is enabled or disabled. Defaults to true.
|
1716
1718
|
*/
|
1717
1719
|
enabled?: boolean | undefined;
|
@@ -1730,13 +1732,13 @@ declare namespace chrome.contextMenus {
|
|
1730
1732
|
type?: ContextItemType | undefined;
|
1731
1733
|
/**
|
1732
1734
|
* Optional.
|
1733
|
-
*
|
1735
|
+
* @since Chrome 21
|
1734
1736
|
* The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension.
|
1735
1737
|
*/
|
1736
1738
|
id?: string | undefined;
|
1737
1739
|
/**
|
1738
1740
|
* Optional.
|
1739
|
-
*
|
1741
|
+
* @since Chrome 62
|
1740
1742
|
* Whether the item is visible in the menu.
|
1741
1743
|
*/
|
1742
1744
|
visible?: boolean | undefined;
|
@@ -1747,7 +1749,7 @@ declare namespace chrome.contextMenus {
|
|
1747
1749
|
checked?: boolean | undefined;
|
1748
1750
|
title?: string | undefined;
|
1749
1751
|
contexts?: ContextType[] | undefined;
|
1750
|
-
/** Optional.
|
1752
|
+
/** Optional. @since Chrome 20 */
|
1751
1753
|
enabled?: boolean | undefined;
|
1752
1754
|
targetUrlPatterns?: string[] | undefined;
|
1753
1755
|
onclick?: Function | undefined;
|
@@ -1756,7 +1758,7 @@ declare namespace chrome.contextMenus {
|
|
1756
1758
|
type?: ContextItemType | undefined;
|
1757
1759
|
/**
|
1758
1760
|
* Optional.
|
1759
|
-
* @since Chrome 62
|
1761
|
+
* @since Chrome 62
|
1760
1762
|
* Whether the item is visible in the menu.
|
1761
1763
|
*/
|
1762
1764
|
visible?: boolean | undefined;
|
@@ -1765,7 +1767,7 @@ declare namespace chrome.contextMenus {
|
|
1765
1767
|
export interface MenuClickedEvent extends chrome.events.Event<(info: OnClickData, tab?: chrome.tabs.Tab) => void> {}
|
1766
1768
|
|
1767
1769
|
/**
|
1768
|
-
*
|
1770
|
+
* @since Chrome 38
|
1769
1771
|
* The maximum number of top level extension items that can be added to an extension action context menu. Any items beyond this limit will be ignored.
|
1770
1772
|
*/
|
1771
1773
|
export var ACTION_MENU_TOP_LEVEL_LIMIT: number;
|
@@ -1796,7 +1798,7 @@ declare namespace chrome.contextMenus {
|
|
1796
1798
|
export function remove(menuItemId: string | number, callback?: () => void): void;
|
1797
1799
|
|
1798
1800
|
/**
|
1799
|
-
*
|
1801
|
+
* @since Chrome 21
|
1800
1802
|
* Fired when a context menu item is clicked.
|
1801
1803
|
*/
|
1802
1804
|
export var onClicked: MenuClickedEvent;
|
@@ -1807,7 +1809,7 @@ declare namespace chrome.contextMenus {
|
|
1807
1809
|
////////////////////
|
1808
1810
|
/**
|
1809
1811
|
* Use the chrome.cookies API to query and modify cookies, and to be notified when they change.
|
1810
|
-
*
|
1812
|
+
* @since Chrome 6
|
1811
1813
|
* Permissions: "cookies", host permissions
|
1812
1814
|
*/
|
1813
1815
|
declare namespace chrome.cookies {
|
@@ -1838,7 +1840,7 @@ declare namespace chrome.cookies {
|
|
1838
1840
|
secure: boolean;
|
1839
1841
|
/**
|
1840
1842
|
* The cookie's same-site status (i.e. whether the cookie is sent with cross-site requests).
|
1841
|
-
* @since Chrome 51
|
1843
|
+
* @since Chrome 51
|
1842
1844
|
*/
|
1843
1845
|
sameSite: SameSiteStatus;
|
1844
1846
|
}
|
@@ -1889,7 +1891,7 @@ declare namespace chrome.cookies {
|
|
1889
1891
|
secure?: boolean | undefined;
|
1890
1892
|
/**
|
1891
1893
|
* Optional. The cookie's same-site status. Defaults to "unspecified", i.e., if omitted, the cookie is set without specifying a SameSite attribute.
|
1892
|
-
* @since Chrome 51
|
1894
|
+
* @since Chrome 51
|
1893
1895
|
*/
|
1894
1896
|
sameSite?: SameSiteStatus | undefined;
|
1895
1897
|
}
|
@@ -1906,7 +1908,7 @@ declare namespace chrome.cookies {
|
|
1906
1908
|
/** True if a cookie was removed. */
|
1907
1909
|
removed: boolean;
|
1908
1910
|
/**
|
1909
|
-
*
|
1911
|
+
* @since Chrome 12
|
1910
1912
|
* The underlying reason behind the cookie's change.
|
1911
1913
|
*/
|
1912
1914
|
cause: string;
|
@@ -1981,7 +1983,7 @@ declare namespace chrome.cookies {
|
|
1981
1983
|
////////////////////
|
1982
1984
|
/**
|
1983
1985
|
* The chrome.debugger API serves as an alternate transport for Chrome's remote debugging protocol. Use chrome.debugger to attach to one or more tabs to instrument network interaction, debug JavaScript, mutate the DOM and CSS, etc. Use the Debuggee tabId to target tabs with sendCommand and route events by tabId from onEvent callbacks.
|
1984
|
-
*
|
1986
|
+
* @since Chrome 18
|
1985
1987
|
* Permissions: "debugger"
|
1986
1988
|
*/
|
1987
1989
|
declare namespace chrome {
|
@@ -1992,20 +1994,20 @@ declare namespace chrome {
|
|
1992
1994
|
tabId?: number | undefined;
|
1993
1995
|
/**
|
1994
1996
|
* Optional.
|
1995
|
-
*
|
1997
|
+
* @since Chrome 27
|
1996
1998
|
* The id of the extension which you intend to debug. Attaching to an extension background page is only possible when 'silent-debugger-extension-api' flag is enabled on the target browser.
|
1997
1999
|
*/
|
1998
2000
|
extensionId?: string | undefined;
|
1999
2001
|
/**
|
2000
2002
|
* Optional.
|
2001
|
-
*
|
2003
|
+
* @since Chrome 28
|
2002
2004
|
* The opaque id of the debug target.
|
2003
2005
|
*/
|
2004
2006
|
targetId?: string | undefined;
|
2005
2007
|
}
|
2006
2008
|
|
2007
2009
|
/**
|
2008
|
-
*
|
2010
|
+
* @since Chrome 28
|
2009
2011
|
* Debug target information
|
2010
2012
|
*/
|
2011
2013
|
export interface TargetInfo {
|
@@ -2015,13 +2017,13 @@ declare namespace chrome {
|
|
2015
2017
|
id: string;
|
2016
2018
|
/**
|
2017
2019
|
* Optional.
|
2018
|
-
*
|
2020
|
+
* @since Chrome 30
|
2019
2021
|
* The tab id, defined if type == 'page'.
|
2020
2022
|
*/
|
2021
2023
|
tabId?: number | undefined;
|
2022
2024
|
/**
|
2023
2025
|
* Optional.
|
2024
|
-
*
|
2026
|
+
* @since Chrome 30
|
2025
2027
|
* The extension id, defined if type = 'background_page'.
|
2026
2028
|
*/
|
2027
2029
|
extensionId?: string | undefined;
|
@@ -2097,13 +2099,13 @@ declare namespace chrome {
|
|
2097
2099
|
callback?: (result?: Object) => void,
|
2098
2100
|
): void;
|
2099
2101
|
/**
|
2100
|
-
*
|
2102
|
+
* @since Chrome 28
|
2101
2103
|
* Returns the list of available debug targets.
|
2102
2104
|
* @return The `getTargets` method provides its result via callback or returned as a `Promise` (MV3 only).
|
2103
2105
|
*/
|
2104
2106
|
export function getTargets(): Promise<TargetInfo[]>;
|
2105
2107
|
/**
|
2106
|
-
*
|
2108
|
+
* @since Chrome 28
|
2107
2109
|
* Returns the list of available debug targets.
|
2108
2110
|
* Parameter result: Array of TargetInfo objects corresponding to the available debug targets.
|
2109
2111
|
*/
|
@@ -2122,7 +2124,7 @@ declare namespace chrome {
|
|
2122
2124
|
////////////////////
|
2123
2125
|
/**
|
2124
2126
|
* Use the chrome.declarativeContent API to take actions depending on the content of a page, without requiring permission to read the page's content.
|
2125
|
-
*
|
2127
|
+
* @since Chrome 33
|
2126
2128
|
* Permissions: "declarativeContent"
|
2127
2129
|
*/
|
2128
2130
|
declare namespace chrome.declarativeContent {
|
@@ -2176,7 +2178,7 @@ declare namespace chrome.declarativeContent {
|
|
2176
2178
|
css?: string[] | undefined;
|
2177
2179
|
/**
|
2178
2180
|
* Optional.
|
2179
|
-
*
|
2181
|
+
* @since Chrome 45
|
2180
2182
|
* Matches if the bookmarked state of the page is equal to the specified value. Requires the bookmarks permission.
|
2181
2183
|
*/
|
2182
2184
|
isBookmarked?: boolean | undefined;
|
@@ -2324,7 +2326,7 @@ declare namespace chrome.declarativeWebRequest {
|
|
2324
2326
|
////////////////////
|
2325
2327
|
/**
|
2326
2328
|
* Desktop Capture API that can be used to capture content of screen, individual windows or tabs.
|
2327
|
-
*
|
2329
|
+
* @since Chrome 34
|
2328
2330
|
* Permissions: "desktopCapture"
|
2329
2331
|
*/
|
2330
2332
|
declare namespace chrome.desktopCapture {
|
@@ -2365,7 +2367,7 @@ declare namespace chrome.desktopCapture {
|
|
2365
2367
|
////////////////////
|
2366
2368
|
/**
|
2367
2369
|
* Use the chrome.devtools.inspectedWindow API to interact with the inspected window: obtain the tab ID for the inspected page, evaluate the code in the context of the inspected window, reload the page, or obtain the list of resources within the page.
|
2368
|
-
*
|
2370
|
+
* @since Chrome 18
|
2369
2371
|
*/
|
2370
2372
|
declare namespace chrome.devtools.inspectedWindow {
|
2371
2373
|
/** A resource within the inspected page, such as a document, a script, or an image. */
|
@@ -2493,7 +2495,7 @@ declare namespace chrome.devtools.inspectedWindow {
|
|
2493
2495
|
////////////////////
|
2494
2496
|
/**
|
2495
2497
|
* Use the chrome.devtools.network API to retrieve the information about network requests displayed by the Developer Tools in the Network panel.
|
2496
|
-
*
|
2498
|
+
* @since Chrome 18
|
2497
2499
|
*/
|
2498
2500
|
declare namespace chrome.devtools.network {
|
2499
2501
|
/** Represents a HAR entry for a specific finished request. */
|
@@ -2538,7 +2540,7 @@ declare namespace chrome.devtools.network {
|
|
2538
2540
|
////////////////////
|
2539
2541
|
/**
|
2540
2542
|
* Use the chrome.devtools.panels API to integrate your extension into Developer Tools window UI: create your own panels, access existing panels, and add sidebars.
|
2541
|
-
*
|
2543
|
+
* @since Chrome 18
|
2542
2544
|
*/
|
2543
2545
|
declare namespace chrome.devtools.panels {
|
2544
2546
|
export interface PanelShownEvent extends chrome.events.Event<(window: Window) => void> {}
|
@@ -2600,7 +2602,7 @@ declare namespace chrome.devtools.panels {
|
|
2600
2602
|
}
|
2601
2603
|
|
2602
2604
|
/**
|
2603
|
-
*
|
2605
|
+
* @since Chrome 41
|
2604
2606
|
* Represents the Sources panel.
|
2605
2607
|
*/
|
2606
2608
|
export interface SourcesPanel {
|
@@ -2673,7 +2675,7 @@ declare namespace chrome.devtools.panels {
|
|
2673
2675
|
/** Elements panel. */
|
2674
2676
|
export var elements: ElementsPanel;
|
2675
2677
|
/**
|
2676
|
-
*
|
2678
|
+
* @since Chrome 38
|
2677
2679
|
* Sources panel.
|
2678
2680
|
*/
|
2679
2681
|
export var sources: SourcesPanel;
|
@@ -2701,7 +2703,7 @@ declare namespace chrome.devtools.panels {
|
|
2701
2703
|
callback?: (resource: chrome.devtools.inspectedWindow.Resource) => void,
|
2702
2704
|
): void;
|
2703
2705
|
/**
|
2704
|
-
*
|
2706
|
+
* @since Chrome 38
|
2705
2707
|
* Requests DevTools to open a URL in a Developer Tools panel.
|
2706
2708
|
* @param url The URL of the resource to open.
|
2707
2709
|
* @param lineNumber Specifies the line number to scroll to when the resource is loaded.
|
@@ -2709,7 +2711,7 @@ declare namespace chrome.devtools.panels {
|
|
2709
2711
|
*/
|
2710
2712
|
export function openResource(url: string, lineNumber: number, callback?: () => void): void;
|
2711
2713
|
/**
|
2712
|
-
*
|
2714
|
+
* @since Chrome 96
|
2713
2715
|
* Requests DevTools to open a URL in a Developer Tools panel.
|
2714
2716
|
* @param url The URL of the resource to open.
|
2715
2717
|
* @param lineNumber Specifies the line number to scroll to when the resource is loaded.
|
@@ -2723,7 +2725,7 @@ declare namespace chrome.devtools.panels {
|
|
2723
2725
|
callback?: (response: unknown) => unknown,
|
2724
2726
|
): void;
|
2725
2727
|
/**
|
2726
|
-
* @since Chrome 59
|
2728
|
+
* @since Chrome 59
|
2727
2729
|
* The name of the color theme set in user's DevTools settings.
|
2728
2730
|
*/
|
2729
2731
|
export var themeName: "default" | "dark";
|
@@ -2734,7 +2736,7 @@ declare namespace chrome.devtools.panels {
|
|
2734
2736
|
////////////////////
|
2735
2737
|
/**
|
2736
2738
|
* Use the chrome.documentScan API to discover and retrieve images from attached paper document scanners.
|
2737
|
-
*
|
2739
|
+
* @since Chrome 44
|
2738
2740
|
* Permissions: "documentScan"
|
2739
2741
|
* Important: This API works only on Chrome OS.
|
2740
2742
|
*/
|
@@ -2766,11 +2768,11 @@ declare namespace chrome.documentScan {
|
|
2766
2768
|
////////////////////
|
2767
2769
|
/**
|
2768
2770
|
* Use the chrome.dom API to programmatically access shadow root in an HTMLElement.
|
2769
|
-
*
|
2771
|
+
* @since Chrome 88
|
2770
2772
|
*/
|
2771
2773
|
declare namespace chrome.dom {
|
2772
2774
|
/**
|
2773
|
-
*
|
2775
|
+
* @since Chrome 88
|
2774
2776
|
* Requests chrome to return the open/closed shadow roots else return null.
|
2775
2777
|
* @param element reference of HTMLElement.
|
2776
2778
|
*/
|
@@ -2782,7 +2784,7 @@ declare namespace chrome.dom {
|
|
2782
2784
|
////////////////////
|
2783
2785
|
/**
|
2784
2786
|
* Use the chrome.downloads API to programmatically initiate, monitor, manipulate, and search for downloads.
|
2785
|
-
*
|
2787
|
+
* @since Chrome 31
|
2786
2788
|
* Permissions: "downloads"
|
2787
2789
|
*/
|
2788
2790
|
declare namespace chrome.downloads {
|
@@ -2821,7 +2823,7 @@ declare namespace chrome.downloads {
|
|
2821
2823
|
url?: StringDelta | undefined;
|
2822
2824
|
/**
|
2823
2825
|
* Optional. The change in finalUrl, if any.
|
2824
|
-
* @since
|
2826
|
+
* @since Chrome 54
|
2825
2827
|
*/
|
2826
2828
|
finalUrl?: StringDelta | undefined;
|
2827
2829
|
/** Optional. The change in totalBytes, if any. */
|
@@ -2853,7 +2855,7 @@ declare namespace chrome.downloads {
|
|
2853
2855
|
previous?: boolean | undefined;
|
2854
2856
|
}
|
2855
2857
|
|
2856
|
-
/**
|
2858
|
+
/** @since Chrome 34 */
|
2857
2859
|
export interface DoubleDelta {
|
2858
2860
|
current?: number | undefined;
|
2859
2861
|
previous?: number | undefined;
|
@@ -2908,7 +2910,7 @@ declare namespace chrome.downloads {
|
|
2908
2910
|
url: string;
|
2909
2911
|
/**
|
2910
2912
|
* The absolute URL that this download is being made from, after all redirects.
|
2911
|
-
* @since
|
2913
|
+
* @since Chrome 54
|
2912
2914
|
*/
|
2913
2915
|
finalUrl: string;
|
2914
2916
|
/** Number of bytes in the whole file, without considering file compression, or -1 if unknown. */
|
@@ -3184,7 +3186,7 @@ declare namespace chrome.downloads {
|
|
3184
3186
|
////////////////////
|
3185
3187
|
/**
|
3186
3188
|
* Use the chrome.enterprise.platformKeys API to generate hardware-backed keys and to install certificates for these keys. The certificates will be managed by the platform and can be used for TLS authentication, network access or by other extension through chrome.platformKeys.
|
3187
|
-
*
|
3189
|
+
* @since Chrome 37
|
3188
3190
|
* Permissions: "enterprise.platformKeys"
|
3189
3191
|
* Important: This API works only on Chrome OS.
|
3190
3192
|
* Note: This API is only for extensions pre-installed by policy.
|
@@ -3207,7 +3209,7 @@ declare namespace chrome.enterprise.platformKeys {
|
|
3207
3209
|
* Protection of the keys, and thus implementation of the non-extractable property, is done in software, so the keys are less protected than hardware-backed keys.
|
3208
3210
|
* Only non-extractable RSASSA-PKCS1-V1_5 keys with modulusLength up to 2048 can be generated. Each key can be used for signing data at most once.
|
3209
3211
|
* Keys generated on a specific Token cannot be used with any other Tokens, nor can they be used with window.crypto.subtle. Equally, Key objects created with window.crypto.subtle cannot be used with this interface.
|
3210
|
-
* @since Chrome 97
|
3212
|
+
* @since Chrome 97
|
3211
3213
|
*/
|
3212
3214
|
softwareBackedSubtleCrypto: SubtleCrypto;
|
3213
3215
|
}
|
@@ -3252,7 +3254,7 @@ declare namespace chrome.enterprise.platformKeys {
|
|
3252
3254
|
* @param challenge A challenge as emitted by the Verified Access Web API.
|
3253
3255
|
* @param registerKey If set, the current Enterprise Machine Key is registered with the "system" token and relinquishes the Enterprise Machine Key role. The key can then be associated with a certificate and used like any other signing key. This key is 2048-bit RSA. Subsequent calls to this function will then generate a new Enterprise Machine Key. Since Chrome 59.
|
3254
3256
|
* @param callback Called back with the challenge response.
|
3255
|
-
* @since Chrome 50
|
3257
|
+
* @since Chrome 50
|
3256
3258
|
*/
|
3257
3259
|
export function challengeMachineKey(
|
3258
3260
|
challenge: ArrayBuffer,
|
@@ -3273,7 +3275,7 @@ declare namespace chrome.enterprise.platformKeys {
|
|
3273
3275
|
* @param challenge A challenge as emitted by the Verified Access Web API.
|
3274
3276
|
* @param registerKey If set, the current Enterprise User Key is registered with the "user" token and relinquishes the Enterprise User Key role. The key can then be associated with a certificate and used like any other signing key. This key is 2048-bit RSA. Subsequent calls to this function will then generate a new Enterprise User Key.
|
3275
3277
|
* @param callback Called back with the challenge response.
|
3276
|
-
* @since Chrome 50
|
3278
|
+
* @since Chrome 50
|
3277
3279
|
*/
|
3278
3280
|
export function challengeUserKey(
|
3279
3281
|
challenge: ArrayBuffer,
|
@@ -3288,7 +3290,7 @@ declare namespace chrome.enterprise.platformKeys {
|
|
3288
3290
|
/**
|
3289
3291
|
* Use the <code>chrome.enterprise.deviceAttributes</code> API to read device attributes.
|
3290
3292
|
* Permissions: "enterprise.deviceAttributes"
|
3291
|
-
*
|
3293
|
+
* @since Chrome 46
|
3292
3294
|
* Important: This API works only on Chrome OS.
|
3293
3295
|
* Note: This API is only for extensions pre-installed by policy.
|
3294
3296
|
*/
|
@@ -3299,7 +3301,7 @@ declare namespace chrome.enterprise.deviceAttributes {
|
|
3299
3301
|
*/
|
3300
3302
|
export function getDirectoryDeviceId(callback: (deviceId: string) => void): void;
|
3301
3303
|
/**
|
3302
|
-
* @since Chrome 66
|
3304
|
+
* @since Chrome 66
|
3303
3305
|
* @description
|
3304
3306
|
* Fetches the device's serial number.
|
3305
3307
|
* Please note the purpose of this API is to administrate the device
|
@@ -3310,7 +3312,7 @@ declare namespace chrome.enterprise.deviceAttributes {
|
|
3310
3312
|
*/
|
3311
3313
|
export function getDeviceSerialNumber(callback: (serialNumber: string) => void): void;
|
3312
3314
|
/**
|
3313
|
-
* @since Chrome 66
|
3315
|
+
* @since Chrome 66
|
3314
3316
|
* @description
|
3315
3317
|
* Fetches the administrator-annotated Asset Id.
|
3316
3318
|
* If the current user is not affiliated or no Asset Id has been set by the administrator, returns an empty string.
|
@@ -3318,7 +3320,7 @@ declare namespace chrome.enterprise.deviceAttributes {
|
|
3318
3320
|
*/
|
3319
3321
|
export function getDeviceAssetId(callback: (assetId: string) => void): void;
|
3320
3322
|
/**
|
3321
|
-
* @since Chrome 66
|
3323
|
+
* @since Chrome 66
|
3322
3324
|
* @description
|
3323
3325
|
* Fetches the administrator-annotated Location.
|
3324
3326
|
* If the current user is not affiliated or no Annotated Location has been set by the administrator, returns an empty string.
|
@@ -3326,7 +3328,7 @@ declare namespace chrome.enterprise.deviceAttributes {
|
|
3326
3328
|
*/
|
3327
3329
|
export function getDeviceAnnotatedLocation(callback: (annotatedLocation: string) => void): void;
|
3328
3330
|
/**
|
3329
|
-
* @since Chrome 82
|
3331
|
+
* @since Chrome 82
|
3330
3332
|
* @description
|
3331
3333
|
* Fetches the device's hostname as set by DeviceHostnameTemplate policy.
|
3332
3334
|
* If the current user is not affiliated or no hostname has been set by the enterprise policy, returns an empty string.
|
@@ -3341,7 +3343,7 @@ declare namespace chrome.enterprise.deviceAttributes {
|
|
3341
3343
|
/**
|
3342
3344
|
* Use the <code>chrome.enterprise.networkingAttributes</code> API to read information about your current network. Note: This API is only available to extensions force-installed by enterprise policy.
|
3343
3345
|
* Important: This API works only on Chrome OS.
|
3344
|
-
* @since Chrome 85
|
3346
|
+
* @since Chrome 85
|
3345
3347
|
*/
|
3346
3348
|
declare namespace chrome.enterprise.networkingAttributes {
|
3347
3349
|
export interface NetworkDetails {
|
@@ -3365,7 +3367,7 @@ declare namespace chrome.enterprise.networkingAttributes {
|
|
3365
3367
|
////////////////////
|
3366
3368
|
/**
|
3367
3369
|
* The chrome.events namespace contains common types used by APIs dispatching events to notify you when something interesting happens.
|
3368
|
-
*
|
3370
|
+
* @since Chrome 21
|
3369
3371
|
*/
|
3370
3372
|
declare namespace chrome.events {
|
3371
3373
|
/** Filters URLs for various criteria. See event filtering. All criteria are case sensitive. */
|
@@ -3374,7 +3376,7 @@ declare namespace chrome.events {
|
|
3374
3376
|
schemes?: string[] | undefined;
|
3375
3377
|
/**
|
3376
3378
|
* Optional.
|
3377
|
-
*
|
3379
|
+
* @since Chrome 23
|
3378
3380
|
* Matches if the URL (without fragment identifier) matches a specified regular expression. Port numbers are stripped from the URL if they match the default port number. The regular expressions use the RE2 syntax.
|
3379
3381
|
*/
|
3380
3382
|
urlMatches?: string | undefined;
|
@@ -3414,7 +3416,7 @@ declare namespace chrome.events {
|
|
3414
3416
|
ports?: Array<number | number[]> | undefined;
|
3415
3417
|
/**
|
3416
3418
|
* Optional.
|
3417
|
-
*
|
3419
|
+
* @since Chrome 28
|
3418
3420
|
* Matches if the URL without query segment and fragment identifier matches a specified regular expression. Port numbers are stripped from the URL if they match the default port number. The regular expressions use the RE2 syntax.
|
3419
3421
|
*/
|
3420
3422
|
originAndPathMatches?: string | undefined;
|
@@ -3503,7 +3505,7 @@ declare namespace chrome.events {
|
|
3503
3505
|
actions: any[];
|
3504
3506
|
/**
|
3505
3507
|
* Optional.
|
3506
|
-
*
|
3508
|
+
* @since Chrome 28
|
3507
3509
|
* Tags can be used to annotate rules and perform operations on sets of rules.
|
3508
3510
|
*/
|
3509
3511
|
tags?: string[] | undefined;
|
@@ -3515,7 +3517,7 @@ declare namespace chrome.events {
|
|
3515
3517
|
////////////////////
|
3516
3518
|
/**
|
3517
3519
|
* The chrome.extension API has utilities that can be used by any extension page. It includes support for exchanging messages between an extension and its content scripts or between extensions, as described in detail in Message Passing.
|
3518
|
-
*
|
3520
|
+
* @since Chrome 5
|
3519
3521
|
*/
|
3520
3522
|
declare namespace chrome.extension {
|
3521
3523
|
export interface FetchProperties {
|
@@ -3544,7 +3546,7 @@ declare namespace chrome.extension {
|
|
3544
3546
|
{}
|
3545
3547
|
|
3546
3548
|
/**
|
3547
|
-
*
|
3549
|
+
* @since Chrome 7
|
3548
3550
|
* True for content scripts running inside incognito tabs, and for extension pages running inside an incognito process. The latter only applies to extensions with 'split' incognito_behavior.
|
3549
3551
|
*/
|
3550
3552
|
export var inIncognitoContext: boolean;
|
@@ -3560,32 +3562,32 @@ declare namespace chrome.extension {
|
|
3560
3562
|
export function getURL(path: string): string;
|
3561
3563
|
/**
|
3562
3564
|
* Sets the value of the ap CGI parameter used in the extension's update URL. This value is ignored for extensions that are hosted in the Chrome Extension Gallery.
|
3563
|
-
*
|
3565
|
+
* @since Chrome 9
|
3564
3566
|
*/
|
3565
3567
|
export function setUpdateUrlData(data: string): void;
|
3566
3568
|
/** Returns an array of the JavaScript 'window' objects for each of the pages running inside the current extension. */
|
3567
3569
|
export function getViews(fetchProperties?: FetchProperties): Window[];
|
3568
3570
|
/**
|
3569
3571
|
* Retrieves the state of the extension's access to the 'file://' scheme (as determined by the user-controlled 'Allow access to File URLs' checkbox.
|
3570
|
-
*
|
3572
|
+
* @since Chrome 12
|
3571
3573
|
* @return The `isAllowedFileSchemeAccess` method provides its result via callback or returned as a `Promise` (MV3 only).
|
3572
3574
|
*/
|
3573
3575
|
export function isAllowedFileSchemeAccess(): Promise<boolean>;
|
3574
3576
|
/**
|
3575
3577
|
* Retrieves the state of the extension's access to the 'file://' scheme (as determined by the user-controlled 'Allow access to File URLs' checkbox.
|
3576
|
-
*
|
3578
|
+
* @since Chrome 12
|
3577
3579
|
* Parameter isAllowedAccess: True if the extension can access the 'file://' scheme, false otherwise.
|
3578
3580
|
*/
|
3579
3581
|
export function isAllowedFileSchemeAccess(callback: (isAllowedAccess: boolean) => void): void;
|
3580
3582
|
/**
|
3581
3583
|
* Retrieves the state of the extension's access to Incognito-mode (as determined by the user-controlled 'Allowed in Incognito' checkbox.
|
3582
|
-
*
|
3584
|
+
* @since Chrome 12
|
3583
3585
|
* @return The `isAllowedIncognitoAccess` method provides its result via callback or returned as a `Promise` (MV3 only).
|
3584
3586
|
*/
|
3585
3587
|
export function isAllowedIncognitoAccess(): Promise<boolean>;
|
3586
3588
|
/**
|
3587
3589
|
* Retrieves the state of the extension's access to Incognito-mode (as determined by the user-controlled 'Allowed in Incognito' checkbox.
|
3588
|
-
*
|
3590
|
+
* @since Chrome 12
|
3589
3591
|
* Parameter isAllowedAccess: True if the extension has access to Incognito mode, false otherwise.
|
3590
3592
|
*/
|
3591
3593
|
export function isAllowedIncognitoAccess(callback: (isAllowedAccess: boolean) => void): void;
|
@@ -3636,7 +3638,7 @@ declare namespace chrome.extension {
|
|
3636
3638
|
////////////////////
|
3637
3639
|
/**
|
3638
3640
|
* Use the chrome.fileBrowserHandler API to extend the Chrome OS file browser. For example, you can use this API to enable users to upload files to your website.
|
3639
|
-
*
|
3641
|
+
* @since Chrome 12
|
3640
3642
|
* Permissions: "fileBrowserHandler"
|
3641
3643
|
* Important: This API works only on Chrome OS.
|
3642
3644
|
*/
|
@@ -3645,7 +3647,7 @@ declare namespace chrome.fileBrowserHandler {
|
|
3645
3647
|
/**
|
3646
3648
|
* Optional.
|
3647
3649
|
* List of file extensions that the selected file can have. The list is also used to specify what files to be shown in the select file dialog. Files with the listed extensions are only shown in the dialog. Extensions should not include the leading '.'. Example: ['jpg', 'png']
|
3648
|
-
*
|
3650
|
+
* @since Chrome 23
|
3649
3651
|
*/
|
3650
3652
|
allowedFileExtensions?: string[] | undefined;
|
3651
3653
|
/** Suggested name for the file. */
|
@@ -3673,7 +3675,7 @@ declare namespace chrome.fileBrowserHandler {
|
|
3673
3675
|
|
3674
3676
|
/**
|
3675
3677
|
* 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.
|
3676
|
-
*
|
3678
|
+
* @since Chrome 21
|
3677
3679
|
* @param selectionParams Parameters that will be used while selecting the file.
|
3678
3680
|
* @param callback Function called upon completion.
|
3679
3681
|
* Parameter result: Result of the method.
|
@@ -3689,7 +3691,7 @@ declare namespace chrome.fileBrowserHandler {
|
|
3689
3691
|
////////////////////
|
3690
3692
|
/**
|
3691
3693
|
* Use the chrome.fileSystemProvider API to create file systems, that can be accessible from the file manager on Chrome OS.
|
3692
|
-
*
|
3694
|
+
* @since Chrome 40
|
3693
3695
|
* Permissions: "fileSystemProvider"
|
3694
3696
|
* Important: This API works only on Chrome OS.
|
3695
3697
|
*/
|
@@ -3745,28 +3747,28 @@ declare namespace chrome.fileSystemProvider {
|
|
3745
3747
|
writable: boolean;
|
3746
3748
|
/**
|
3747
3749
|
* The maximum number of files that can be opened at once. If 0, then not limited.
|
3748
|
-
* @since
|
3750
|
+
* @since Chrome 42
|
3749
3751
|
*/
|
3750
3752
|
openedFilesLimit: number;
|
3751
3753
|
/**
|
3752
3754
|
* List of currently opened files.
|
3753
|
-
* @since
|
3755
|
+
* @since Chrome 42
|
3754
3756
|
*/
|
3755
3757
|
openedFiles: OpenedFileInfo[];
|
3756
3758
|
/**
|
3757
3759
|
* Optional.
|
3758
3760
|
* Whether the file system supports the tag field for observing directories.
|
3759
|
-
* @since
|
3761
|
+
* @since Chrome 45
|
3760
3762
|
*/
|
3761
3763
|
supportsNotifyTag?: boolean | undefined;
|
3762
3764
|
/**
|
3763
3765
|
* List of watchers.
|
3764
|
-
* @since
|
3766
|
+
* @since Chrome 45
|
3765
3767
|
*/
|
3766
3768
|
watchers: FileWatchersInfo[];
|
3767
3769
|
}
|
3768
3770
|
|
3769
|
-
/** @since
|
3771
|
+
/** @since Chrome 45 */
|
3770
3772
|
export interface GetActionsRequestedOptions {
|
3771
3773
|
/** The identifier of the file system related to this operation. */
|
3772
3774
|
fileSystemId: string;
|
@@ -3776,7 +3778,7 @@ declare namespace chrome.fileSystemProvider {
|
|
3776
3778
|
entryPaths: string[];
|
3777
3779
|
}
|
3778
3780
|
|
3779
|
-
/** @since
|
3781
|
+
/** @since Chrome 45 */
|
3780
3782
|
export interface Action {
|
3781
3783
|
/** The identifier of the action. Any string or CommonActionId for common actions. */
|
3782
3784
|
id: string;
|
@@ -3784,7 +3786,7 @@ declare namespace chrome.fileSystemProvider {
|
|
3784
3786
|
title?: string | undefined;
|
3785
3787
|
}
|
3786
3788
|
|
3787
|
-
/** @since
|
3789
|
+
/** @since Chrome 45 */
|
3788
3790
|
export interface ExecuteActionRequestedOptions {
|
3789
3791
|
/** The identifier of the file system related to this operation. */
|
3790
3792
|
fileSystemId: string;
|
@@ -3806,13 +3808,13 @@ declare namespace chrome.fileSystemProvider {
|
|
3806
3808
|
/**
|
3807
3809
|
* Optional.
|
3808
3810
|
* The maximum number of files that can be opened at once. If not specified, or 0, then not limited.
|
3809
|
-
* @since
|
3811
|
+
* @since Chrome 41
|
3810
3812
|
*/
|
3811
3813
|
openedFilesLimit?: number | undefined;
|
3812
3814
|
/**
|
3813
3815
|
* Optional.
|
3814
3816
|
* Whether the file system supports the tag field for observed directories.
|
3815
|
-
* @since
|
3817
|
+
* @since Chrome 45
|
3816
3818
|
*/
|
3817
3819
|
supportsNotifyTag?: boolean | undefined;
|
3818
3820
|
}
|
@@ -4119,7 +4121,7 @@ declare namespace chrome.fileSystemProvider {
|
|
4119
4121
|
export function getAll(callback: (fileSystems: FileSystemInfo[]) => void): void;
|
4120
4122
|
/**
|
4121
4123
|
* Returns information about a file system with the passed fileSystemId.
|
4122
|
-
* @since
|
4124
|
+
* @since Chrome 42
|
4123
4125
|
* @param callback Callback to receive the result of get function.
|
4124
4126
|
*/
|
4125
4127
|
export function get(fileSystemId: string, callback: (fileSystem: FileSystemInfo) => void): void;
|
@@ -4164,22 +4166,22 @@ declare namespace chrome.fileSystemProvider {
|
|
4164
4166
|
export var onAbortRequested: OperationRequestedEvent;
|
4165
4167
|
/**
|
4166
4168
|
* Raised when showing a configuration dialog for fileSystemId is requested. If it's handled, the file_system_provider.configurable manfiest option must be set to true.
|
4167
|
-
* @since
|
4169
|
+
* @since Chrome 44
|
4168
4170
|
*/
|
4169
4171
|
export var onConfigureRequested: RequestedEvent;
|
4170
4172
|
/**
|
4171
4173
|
* Raised when showing a dialog for mounting a new file system is requested. If the extension/app is a file handler, then this event shouldn't be handled. Instead app.runtime.onLaunched should be handled in order to mount new file systems when a file is opened. For multiple mounts, the file_system_provider.multiple_mounts manifest option must be set to true.
|
4172
|
-
* @since
|
4174
|
+
* @since Chrome 44
|
4173
4175
|
*/
|
4174
4176
|
export var onMountRequested: OptionlessRequestedEvent;
|
4175
4177
|
/**
|
4176
4178
|
* Raised when setting a new directory watcher is requested. If an error occurs, then errorCallback must be called.
|
4177
|
-
* @since
|
4179
|
+
* @since Chrome 45
|
4178
4180
|
*/
|
4179
4181
|
export var onAddWatcherRequested: EntryPathRecursiveRequestedEvent;
|
4180
4182
|
/**
|
4181
4183
|
* Raised when the watcher should be removed. If an error occurs, then errorCallback must be called.
|
4182
|
-
* @since
|
4184
|
+
* @since Chrome 45
|
4183
4185
|
*/
|
4184
4186
|
export var onRemoveWatcherRequested: EntryPathRecursiveRequestedEvent;
|
4185
4187
|
|
@@ -4206,7 +4208,7 @@ declare namespace chrome.fileSystemProvider {
|
|
4206
4208
|
////////////////////
|
4207
4209
|
/**
|
4208
4210
|
* Use the chrome.fontSettings API to manage Chrome's font settings.
|
4209
|
-
*
|
4211
|
+
* @since Chrome 22
|
4210
4212
|
* Permissions: "fontSettings"
|
4211
4213
|
*/
|
4212
4214
|
declare namespace chrome.fontSettings {
|
@@ -4429,7 +4431,7 @@ declare namespace chrome.fontSettings {
|
|
4429
4431
|
////////////////////
|
4430
4432
|
/**
|
4431
4433
|
* Use chrome.gcm to enable apps and extensions to send and receive messages through the Google Cloud Messaging Service.
|
4432
|
-
*
|
4434
|
+
* @since Chrome 35
|
4433
4435
|
* Permissions: "gcm"
|
4434
4436
|
*/
|
4435
4437
|
declare namespace chrome.gcm {
|
@@ -4450,7 +4452,7 @@ declare namespace chrome.gcm {
|
|
4450
4452
|
/**
|
4451
4453
|
* Optional.
|
4452
4454
|
* The sender who issued the message.
|
4453
|
-
* @since
|
4455
|
+
* @since Chrome 41
|
4454
4456
|
*/
|
4455
4457
|
from?: string | undefined;
|
4456
4458
|
/**
|
@@ -4511,7 +4513,7 @@ declare namespace chrome.gcm {
|
|
4511
4513
|
////////////////////
|
4512
4514
|
/**
|
4513
4515
|
* Use the chrome.history API to interact with the browser's record of visited pages. You can add, remove, and query for URLs in the browser's history. To override the history page with your own version, see Override Pages.
|
4514
|
-
*
|
4516
|
+
* @since Chrome 5
|
4515
4517
|
* Permissions: "history"
|
4516
4518
|
*/
|
4517
4519
|
declare namespace chrome.history {
|
@@ -4645,7 +4647,7 @@ declare namespace chrome.history {
|
|
4645
4647
|
////////////////////
|
4646
4648
|
/**
|
4647
4649
|
* Use the chrome.i18n infrastructure to implement internationalization across your whole app or extension.
|
4648
|
-
* @since Chrome 5
|
4650
|
+
* @since Chrome 5
|
4649
4651
|
*/
|
4650
4652
|
declare namespace chrome.i18n {
|
4651
4653
|
/** Holds detected ISO language code and its percentage in the input string */
|
@@ -4687,7 +4689,7 @@ declare namespace chrome.i18n {
|
|
4687
4689
|
export function getMessage(messageName: string, substitutions?: string | string[]): string;
|
4688
4690
|
/**
|
4689
4691
|
* Gets the browser UI language of the browser. This is different from i18n.getAcceptLanguages which returns the preferred user languages.
|
4690
|
-
* @since Chrome 35
|
4692
|
+
* @since Chrome 35
|
4691
4693
|
*/
|
4692
4694
|
export function getUILanguage(): string;
|
4693
4695
|
|
@@ -4709,16 +4711,16 @@ declare namespace chrome.i18n {
|
|
4709
4711
|
/**
|
4710
4712
|
* Use the chrome.identity API to get OAuth2 access tokens.
|
4711
4713
|
* Permissions: "identity"
|
4712
|
-
* @since Chrome 29
|
4714
|
+
* @since Chrome 29
|
4713
4715
|
*/
|
4714
4716
|
declare namespace chrome.identity {
|
4715
|
-
/** @since Chrome 32
|
4717
|
+
/** @since Chrome 32 */
|
4716
4718
|
export interface AccountInfo {
|
4717
4719
|
/** A unique identifier for the account. This ID will not change for the lifetime of the account. */
|
4718
4720
|
id: string;
|
4719
4721
|
}
|
4720
4722
|
|
4721
|
-
/** @since Chrome 84
|
4723
|
+
/** @since Chrome 84 */
|
4722
4724
|
export enum AccountStatus {
|
4723
4725
|
SYNC = "SYNC",
|
4724
4726
|
ANY = "ANY",
|
@@ -4742,14 +4744,14 @@ declare namespace chrome.identity {
|
|
4742
4744
|
* Optional.
|
4743
4745
|
* The account ID whose token should be returned. If not specified, the primary account for the profile will be used.
|
4744
4746
|
* account is only supported when the "enable-new-profile-management" flag is set.
|
4745
|
-
* @since Chrome 37
|
4747
|
+
* @since Chrome 37
|
4746
4748
|
*/
|
4747
4749
|
account?: AccountInfo | undefined;
|
4748
4750
|
/**
|
4749
4751
|
* Optional.
|
4750
4752
|
* A list of OAuth2 scopes to request.
|
4751
4753
|
* When the scopes field is present, it overrides the list of scopes specified in manifest.json.
|
4752
|
-
* @since Chrome 37
|
4754
|
+
* @since Chrome 37
|
4753
4755
|
*/
|
4754
4756
|
scopes?: string[] | undefined;
|
4755
4757
|
}
|
@@ -4800,7 +4802,7 @@ declare namespace chrome.identity {
|
|
4800
4802
|
* * Removes user's account preferences
|
4801
4803
|
* * De-authorizes the user from all auth flows
|
4802
4804
|
* If `callback` is not provided, the function returns a Promise when the state has been cleared.
|
4803
|
-
* @since Chrome 87
|
4805
|
+
* @since Chrome 87
|
4804
4806
|
* @param callback Called when the state has been cleared.
|
4805
4807
|
*/
|
4806
4808
|
export function clearAllCachedAuthTokens(): Promise<void>;
|
@@ -4831,14 +4833,14 @@ declare namespace chrome.identity {
|
|
4831
4833
|
/**
|
4832
4834
|
* Retrieves email address and obfuscated gaia id of the user signed into a profile.
|
4833
4835
|
* This API is different from identity.getAccounts in two ways. The information returned is available offline, and it only applies to the primary account for the profile.
|
4834
|
-
* @since Chrome 37
|
4836
|
+
* @since Chrome 37
|
4835
4837
|
*/
|
4836
4838
|
export function getProfileUserInfo(callback: (userInfo: UserInfo) => void): void;
|
4837
4839
|
|
4838
|
-
/** @since Chrome 84
|
4840
|
+
/** @since Chrome 84 */
|
4839
4841
|
export function getProfileUserInfo(details: ProfileDetails, callback: (userInfo: UserInfo) => void): void;
|
4840
4842
|
|
4841
|
-
/** @since Chrome 84
|
4843
|
+
/** @since Chrome 84 */
|
4842
4844
|
export function getProfileUserInfo(details: ProfileDetails): Promise<UserInfo>;
|
4843
4845
|
|
4844
4846
|
/**
|
@@ -4864,14 +4866,14 @@ declare namespace chrome.identity {
|
|
4864
4866
|
/**
|
4865
4867
|
* Generates a redirect URL to be used in launchWebAuthFlow.
|
4866
4868
|
* The generated URLs match the pattern https://<app-id>.chromiumapp.org/*.
|
4867
|
-
* @since Chrome 33
|
4869
|
+
* @since Chrome 33
|
4868
4870
|
* @param path Optional. The path appended to the end of the generated URL.
|
4869
4871
|
*/
|
4870
4872
|
export function getRedirectURL(path?: string): string;
|
4871
4873
|
|
4872
4874
|
/**
|
4873
4875
|
* Fired when signin state changes for an account on the user's profile.
|
4874
|
-
* @since Chrome 33
|
4876
|
+
* @since Chrome 33
|
4875
4877
|
*/
|
4876
4878
|
export var onSignInChanged: SignInChangeEvent;
|
4877
4879
|
}
|
@@ -4882,7 +4884,7 @@ declare namespace chrome.identity {
|
|
4882
4884
|
/**
|
4883
4885
|
* Use the chrome.idle API to detect when the machine's idle state changes.
|
4884
4886
|
* Permissions: "idle"
|
4885
|
-
* @since Chrome 6
|
4887
|
+
* @since Chrome 6
|
4886
4888
|
*/
|
4887
4889
|
declare namespace chrome.idle {
|
4888
4890
|
export type IdleState = "active" | "idle" | "locked";
|
@@ -4891,12 +4893,12 @@ declare namespace chrome.idle {
|
|
4891
4893
|
/**
|
4892
4894
|
* 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.
|
4893
4895
|
* @param detectionIntervalInSeconds The system is considered idle if detectionIntervalInSeconds seconds have elapsed since the last user input detected.
|
4894
|
-
*
|
4896
|
+
* @since Chrome 25
|
4895
4897
|
*/
|
4896
4898
|
export function queryState(detectionIntervalInSeconds: number, callback: (newState: IdleState) => void): void;
|
4897
4899
|
/**
|
4898
4900
|
* Sets the interval, in seconds, used to determine when the system is in an idle state for onStateChanged events. The default interval is 60 seconds.
|
4899
|
-
* @since Chrome 25
|
4901
|
+
* @since Chrome 25
|
4900
4902
|
* @param intervalInSeconds Threshold, in seconds, used to determine when the system is in an idle state.
|
4901
4903
|
*/
|
4902
4904
|
export function setDetectionInterval(intervalInSeconds: number): void;
|
@@ -4916,7 +4918,7 @@ declare namespace chrome.idle {
|
|
4916
4918
|
/**
|
4917
4919
|
* Use the chrome.input.ime API to implement a custom IME for Chrome OS. This allows your extension to handle keystrokes, set the composition, and manage the candidate window.
|
4918
4920
|
* Permissions: "input"
|
4919
|
-
* @since Chrome 21
|
4921
|
+
* @since Chrome 21
|
4920
4922
|
*/
|
4921
4923
|
declare namespace chrome.input.ime {
|
4922
4924
|
/** See http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent */
|
@@ -4934,7 +4936,7 @@ declare namespace chrome.input.ime {
|
|
4934
4936
|
/**
|
4935
4937
|
* Optional.
|
4936
4938
|
* Whether or not the ALTGR key is pressed.
|
4937
|
-
* @since Chrome 79
|
4939
|
+
* @since Chrome 79
|
4938
4940
|
*/
|
4939
4941
|
altgrKey?: boolean | undefined;
|
4940
4942
|
/**
|
@@ -4955,32 +4957,32 @@ declare namespace chrome.input.ime {
|
|
4955
4957
|
/**
|
4956
4958
|
* Optional.
|
4957
4959
|
* The extension ID of the sender of this keyevent.
|
4958
|
-
* @since Chrome 34
|
4960
|
+
* @since Chrome 34
|
4959
4961
|
*/
|
4960
4962
|
extensionId?: string | undefined;
|
4961
4963
|
/**
|
4962
4964
|
* Optional.
|
4963
4965
|
* Value of the physical key being pressed. The value is not affected by current keyboard layout or modifier state.
|
4964
|
-
* @since Chrome 26
|
4966
|
+
* @since Chrome 26
|
4965
4967
|
*/
|
4966
4968
|
code: string;
|
4967
4969
|
/**
|
4968
4970
|
* Optional.
|
4969
4971
|
* The deprecated HTML keyCode, which is system- and implementation-dependent numerical code signifying the unmodified identifier associated with the key pressed.
|
4970
|
-
* @since Chrome 37
|
4972
|
+
* @since Chrome 37
|
4971
4973
|
*/
|
4972
4974
|
keyCode?: number | undefined;
|
4973
4975
|
/**
|
4974
4976
|
* Optional.
|
4975
4977
|
* Whether or not the CAPS_LOCK is enabled.
|
4976
|
-
* @since Chrome 29
|
4978
|
+
* @since Chrome 29
|
4977
4979
|
*/
|
4978
4980
|
capsLock?: boolean | undefined;
|
4979
4981
|
}
|
4980
4982
|
|
4981
4983
|
/**
|
4982
4984
|
* The auto-capitalize type of the text field.
|
4983
|
-
* @since Chrome 69
|
4985
|
+
* @since Chrome 69
|
4984
4986
|
*/
|
4985
4987
|
export type AutoCapitalizeType = "characters" | "words" | "sentences";
|
4986
4988
|
/** Describes an input Context */
|
@@ -4991,34 +4993,34 @@ declare namespace chrome.input.ime {
|
|
4991
4993
|
type: string;
|
4992
4994
|
/**
|
4993
4995
|
* Whether the text field wants auto-correct.
|
4994
|
-
* @since Chrome 40
|
4996
|
+
* @since Chrome 40
|
4995
4997
|
*/
|
4996
4998
|
autoCorrect: boolean;
|
4997
4999
|
/**
|
4998
5000
|
* Whether the text field wants auto-complete.
|
4999
|
-
* @since Chrome 40
|
5001
|
+
* @since Chrome 40
|
5000
5002
|
*/
|
5001
5003
|
autoComplete: boolean;
|
5002
5004
|
/**
|
5003
5005
|
* Whether the text field wants spell-check.
|
5004
|
-
* @since Chrome 40
|
5006
|
+
* @since Chrome 40
|
5005
5007
|
*/
|
5006
5008
|
spellCheck: boolean;
|
5007
5009
|
/**
|
5008
5010
|
* The auto-capitalize type of the text field.
|
5009
|
-
* @since Chrome 69
|
5011
|
+
* @since Chrome 69
|
5010
5012
|
*/
|
5011
5013
|
autoCapitalize: AutoCapitalizeType;
|
5012
5014
|
/**
|
5013
5015
|
* Whether text entered into the text field should be used to improve typing suggestions for the user.
|
5014
|
-
* @since Chrome 68
|
5016
|
+
* @since Chrome 68
|
5015
5017
|
*/
|
5016
5018
|
shouldDoLearning: boolean;
|
5017
5019
|
}
|
5018
5020
|
|
5019
5021
|
/**
|
5020
5022
|
* A menu item used by an input method to interact with the user from the language menu.
|
5021
|
-
* @since Chrome 30
|
5023
|
+
* @since Chrome 30
|
5022
5024
|
*/
|
5023
5025
|
export interface MenuItem {
|
5024
5026
|
/** String that will be passed to callbacks referencing this MenuItem. */
|
@@ -5166,19 +5168,19 @@ declare namespace chrome.input.ime {
|
|
5166
5168
|
/**
|
5167
5169
|
* Optional.
|
5168
5170
|
* Where to display the candidate window.
|
5169
|
-
* @since Chrome 28
|
5171
|
+
* @since Chrome 28
|
5170
5172
|
*/
|
5171
5173
|
windowPosition?: string | undefined;
|
5172
5174
|
/**
|
5173
5175
|
* Optional.
|
5174
5176
|
* The index of the current chosen candidate out of total candidates.
|
5175
|
-
* @since Chrome 84
|
5177
|
+
* @since Chrome 84
|
5176
5178
|
*/
|
5177
5179
|
currentCandidateIndex?: number | undefined;
|
5178
5180
|
/**
|
5179
5181
|
* Optional.
|
5180
5182
|
* The total number of candidates for the candidate window.
|
5181
|
-
* @since Chrome 84
|
5183
|
+
* @since Chrome 84
|
5182
5184
|
*/
|
5183
5185
|
totalCandidates?: number | undefined;
|
5184
5186
|
}
|
@@ -5342,23 +5344,23 @@ declare namespace chrome.input.ime {
|
|
5342
5344
|
): void;
|
5343
5345
|
/**
|
5344
5346
|
* Sends the key events. This function is expected to be used by virtual keyboards. When key(s) on a virtual keyboard is pressed by a user, this function is used to propagate that event to the system.
|
5345
|
-
* @since Chrome 33
|
5347
|
+
* @since Chrome 33
|
5346
5348
|
* @param callback Called when the operation completes.
|
5347
5349
|
*/
|
5348
5350
|
export function sendKeyEvents(parameters: SendKeyEventParameters, callback?: () => void): void;
|
5349
5351
|
/**
|
5350
5352
|
* Hides the input view window, which is popped up automatically by system. If the input view window is already hidden, this function will do nothing.
|
5351
|
-
* @since Chrome 34
|
5353
|
+
* @since Chrome 34
|
5352
5354
|
*/
|
5353
5355
|
export function hideInputView(): void;
|
5354
5356
|
/**
|
5355
5357
|
* Deletes the text around the caret.
|
5356
|
-
* @since Chrome 27
|
5358
|
+
* @since Chrome 27
|
5357
5359
|
*/
|
5358
5360
|
export function deleteSurroundingText(parameters: DeleteSurroundingTextParameters, callback?: () => void): void;
|
5359
5361
|
/**
|
5360
5362
|
* Indicates that the key event received by onKeyEvent is handled. This should only be called if the onKeyEvent listener is asynchronous.
|
5361
|
-
* @since Chrome 25
|
5363
|
+
* @since Chrome 25
|
5362
5364
|
* @param requestId Request id of the event that was handled. This should come from keyEvent.requestId
|
5363
5365
|
* @param response True if the keystroke was handled, false if not
|
5364
5366
|
*/
|
@@ -5384,12 +5386,12 @@ declare namespace chrome.input.ime {
|
|
5384
5386
|
export var onMenuItemActivated: MenuItemActivatedEvent;
|
5385
5387
|
/**
|
5386
5388
|
* Called when the editable string around caret is changed or when the caret position is moved. The text length is limited to 100 characters for each back and forth direction.
|
5387
|
-
* @since Chrome 27
|
5389
|
+
* @since Chrome 27
|
5388
5390
|
*/
|
5389
5391
|
export var onSurroundingTextChanged: SurroundingTextChangedEvent;
|
5390
5392
|
/**
|
5391
5393
|
* This event is sent when chrome terminates ongoing text input session.
|
5392
|
-
* @since Chrome 29
|
5394
|
+
* @since Chrome 29
|
5393
5395
|
*/
|
5394
5396
|
export var onReset: InputResetEvent;
|
5395
5397
|
}
|
@@ -5397,7 +5399,7 @@ declare namespace chrome.input.ime {
|
|
5397
5399
|
/**
|
5398
5400
|
* Use chrome.instanceID to access the Instance ID service.
|
5399
5401
|
* Permissions: "gcm"
|
5400
|
-
* @since Chrome 44
|
5402
|
+
* @since Chrome 44
|
5401
5403
|
*/
|
5402
5404
|
declare namespace chrome.instanceID {
|
5403
5405
|
export interface TokenRefreshEvent extends chrome.events.Event<() => void> {}
|
@@ -5480,7 +5482,7 @@ declare namespace chrome.instanceID {
|
|
5480
5482
|
/**
|
5481
5483
|
* Use the chrome.loginState API to read and monitor the login state.
|
5482
5484
|
* Permissions: "loginState"
|
5483
|
-
* @since Chrome 78
|
5485
|
+
* @since Chrome 78
|
5484
5486
|
* Important: This API works only on Chrome OS.
|
5485
5487
|
*/
|
5486
5488
|
declare namespace chrome.loginState {
|
@@ -5508,7 +5510,7 @@ declare namespace chrome.loginState {
|
|
5508
5510
|
/**
|
5509
5511
|
* The chrome.management API provides ways to manage the list of extensions/apps that are installed and running. It is particularly useful for extensions that override the built-in New Tab page.
|
5510
5512
|
* Permissions: "management"
|
5511
|
-
* @since Chrome 8
|
5513
|
+
* @since Chrome 8
|
5512
5514
|
*/
|
5513
5515
|
declare namespace chrome.management {
|
5514
5516
|
/** Information about an installed extension, app, or theme. */
|
@@ -5516,19 +5518,19 @@ declare namespace chrome.management {
|
|
5516
5518
|
/**
|
5517
5519
|
* Optional.
|
5518
5520
|
* A reason the item is disabled.
|
5519
|
-
* @since Chrome 17
|
5521
|
+
* @since Chrome 17
|
5520
5522
|
*/
|
5521
5523
|
disabledReason?: string | undefined;
|
5522
5524
|
/** Optional. The launch url (only present for apps). */
|
5523
5525
|
appLaunchUrl?: string | undefined;
|
5524
5526
|
/**
|
5525
5527
|
* The description of this extension, app, or theme.
|
5526
|
-
* @since Chrome 9
|
5528
|
+
* @since Chrome 9
|
5527
5529
|
*/
|
5528
5530
|
description: string;
|
5529
5531
|
/**
|
5530
5532
|
* Returns a list of API based permissions.
|
5531
|
-
* @since Chrome 9
|
5533
|
+
* @since Chrome 9
|
5532
5534
|
*/
|
5533
5535
|
permissions: string[];
|
5534
5536
|
/**
|
@@ -5538,7 +5540,7 @@ declare namespace chrome.management {
|
|
5538
5540
|
icons?: IconInfo[] | undefined;
|
5539
5541
|
/**
|
5540
5542
|
* Returns a list of host based permissions.
|
5541
|
-
* @since Chrome 9
|
5543
|
+
* @since Chrome 9
|
5542
5544
|
*/
|
5543
5545
|
hostPermissions: string[];
|
5544
5546
|
/** Whether it is currently enabled or disabled. */
|
@@ -5546,17 +5548,17 @@ declare namespace chrome.management {
|
|
5546
5548
|
/**
|
5547
5549
|
* Optional.
|
5548
5550
|
* The URL of the homepage of this extension, app, or theme.
|
5549
|
-
* @since Chrome 11
|
5551
|
+
* @since Chrome 11
|
5550
5552
|
*/
|
5551
5553
|
homepageUrl?: string | undefined;
|
5552
5554
|
/**
|
5553
5555
|
* Whether this extension can be disabled or uninstalled by the user.
|
5554
|
-
* @since Chrome 12
|
5556
|
+
* @since Chrome 12
|
5555
5557
|
*/
|
5556
5558
|
mayDisable: boolean;
|
5557
5559
|
/**
|
5558
5560
|
* How the extension was installed.
|
5559
|
-
* @since Chrome 22
|
5561
|
+
* @since Chrome 22
|
5560
5562
|
*/
|
5561
5563
|
installType: string;
|
5562
5564
|
/** The version of this extension, app, or theme. */
|
@@ -5565,18 +5567,18 @@ declare namespace chrome.management {
|
|
5565
5567
|
id: string;
|
5566
5568
|
/**
|
5567
5569
|
* Whether the extension, app, or theme declares that it supports offline.
|
5568
|
-
* @since Chrome 15
|
5570
|
+
* @since Chrome 15
|
5569
5571
|
*/
|
5570
5572
|
offlineEnabled: boolean;
|
5571
5573
|
/**
|
5572
5574
|
* Optional.
|
5573
5575
|
* The update URL of this extension, app, or theme.
|
5574
|
-
* @since Chrome 16
|
5576
|
+
* @since Chrome 16
|
5575
5577
|
*/
|
5576
5578
|
updateUrl?: string | undefined;
|
5577
5579
|
/**
|
5578
5580
|
* The type of this extension, app, or theme.
|
5579
|
-
* @since Chrome 23
|
5581
|
+
* @since Chrome 23
|
5580
5582
|
*/
|
5581
5583
|
type: string;
|
5582
5584
|
/** The url for the item's options page, if it has one. */
|
@@ -5585,7 +5587,7 @@ declare namespace chrome.management {
|
|
5585
5587
|
name: string;
|
5586
5588
|
/**
|
5587
5589
|
* A short version of the name of this extension, app, or theme.
|
5588
|
-
* @since Chrome 31
|
5590
|
+
* @since Chrome 31
|
5589
5591
|
*/
|
5590
5592
|
shortName: string;
|
5591
5593
|
/**
|
@@ -5596,13 +5598,13 @@ declare namespace chrome.management {
|
|
5596
5598
|
/**
|
5597
5599
|
* Optional.
|
5598
5600
|
* The app launch type (only present for apps).
|
5599
|
-
* @since Chrome 37
|
5601
|
+
* @since Chrome 37
|
5600
5602
|
*/
|
5601
5603
|
launchType?: string | undefined;
|
5602
5604
|
/**
|
5603
5605
|
* Optional.
|
5604
5606
|
* The currently available launch types (only present for apps).
|
5605
|
-
* @since Chrome 37
|
5607
|
+
* @since Chrome 37
|
5606
5608
|
*/
|
5607
5609
|
availableLaunchTypes?: string[] | undefined;
|
5608
5610
|
}
|
@@ -5646,27 +5648,27 @@ declare namespace chrome.management {
|
|
5646
5648
|
export function setEnabled(id: string, enabled: boolean, callback: () => void): void;
|
5647
5649
|
/**
|
5648
5650
|
* Returns a list of permission warnings for the given extension id.
|
5649
|
-
* @since Chrome 15
|
5651
|
+
* @since Chrome 15
|
5650
5652
|
* @param id The ID of an already installed extension.
|
5651
5653
|
* @return The `getPermissionWarningsById` method provides its result via callback or returned as a `Promise` (MV3 only).
|
5652
5654
|
*/
|
5653
5655
|
export function getPermissionWarningsById(id: string): Promise<string[]>;
|
5654
5656
|
/**
|
5655
5657
|
* Returns a list of permission warnings for the given extension id.
|
5656
|
-
* @since Chrome 15
|
5658
|
+
* @since Chrome 15
|
5657
5659
|
* @param id The ID of an already installed extension.
|
5658
5660
|
*/
|
5659
5661
|
export function getPermissionWarningsById(id: string, callback: (permissionWarnings: string[]) => void): void;
|
5660
5662
|
/**
|
5661
5663
|
* Returns information about the installed extension, app, or theme that has the given ID.
|
5662
|
-
* @since Chrome 9
|
5664
|
+
* @since Chrome 9
|
5663
5665
|
* @param id The ID from an item of management.ExtensionInfo.
|
5664
5666
|
* @return The `get` method provides its result via callback or returned as a `Promise` (MV3 only).
|
5665
5667
|
*/
|
5666
5668
|
export function get(id: string): Promise<ExtensionInfo>;
|
5667
5669
|
/**
|
5668
5670
|
* Returns information about the installed extension, app, or theme that has the given ID.
|
5669
|
-
* @since Chrome 9
|
5671
|
+
* @since Chrome 9
|
5670
5672
|
* @param id The ID from an item of management.ExtensionInfo.
|
5671
5673
|
*/
|
5672
5674
|
export function get(id: string, callback: (result: ExtensionInfo) => void): void;
|
@@ -5681,7 +5683,7 @@ declare namespace chrome.management {
|
|
5681
5683
|
export function getAll(callback: (result: ExtensionInfo[]) => void): void;
|
5682
5684
|
/**
|
5683
5685
|
* Returns a list of permission warnings for the given extension manifest string. Note: This function can be used without requesting the 'management' permission in the manifest.
|
5684
|
-
* @since Chrome 15
|
5686
|
+
* @since Chrome 15
|
5685
5687
|
* @param manifestStr Extension manifest JSON string.
|
5686
5688
|
* @return The `getPermissionWarningsByManifest` method provides its result via callback or returned as a `Promise` (MV3 only).
|
5687
5689
|
*/
|
@@ -5690,7 +5692,7 @@ declare namespace chrome.management {
|
|
5690
5692
|
): Promise<string[]>;
|
5691
5693
|
/**
|
5692
5694
|
* Returns a list of permission warnings for the given extension manifest string. Note: This function can be used without requesting the 'management' permission in the manifest.
|
5693
|
-
* @since Chrome 15
|
5695
|
+
* @since Chrome 15
|
5694
5696
|
* @param manifestStr Extension manifest JSON string.
|
5695
5697
|
*/
|
5696
5698
|
export function getPermissionWarningsByManifest(
|
@@ -5710,14 +5712,14 @@ declare namespace chrome.management {
|
|
5710
5712
|
export function launchApp(id: string, callback: () => void): void;
|
5711
5713
|
/**
|
5712
5714
|
* Uninstalls a currently installed app or extension.
|
5713
|
-
* @since Chrome 21
|
5715
|
+
* @since Chrome 21
|
5714
5716
|
* @param id This should be the id from an item of management.ExtensionInfo.
|
5715
5717
|
* @return The `uninstall` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
5716
5718
|
*/
|
5717
5719
|
export function uninstall(id: string, options?: UninstallOptions): Promise<void>;
|
5718
5720
|
/**
|
5719
5721
|
* Uninstalls a currently installed app or extension.
|
5720
|
-
* @since Chrome 21
|
5722
|
+
* @since Chrome 21
|
5721
5723
|
* @param id This should be the id from an item of management.ExtensionInfo.
|
5722
5724
|
*/
|
5723
5725
|
export function uninstall(id: string, callback: () => void): void;
|
@@ -5737,56 +5739,56 @@ declare namespace chrome.management {
|
|
5737
5739
|
export function uninstall(id: string, callback: () => void): void;
|
5738
5740
|
/**
|
5739
5741
|
* Returns information about the calling extension, app, or theme. Note: This function can be used without requesting the 'management' permission in the manifest.
|
5740
|
-
* @since Chrome 39
|
5742
|
+
* @since Chrome 39
|
5741
5743
|
* @return The `getSelf` method provides its result via callback or returned as a `Promise` (MV3 only).
|
5742
5744
|
*/
|
5743
5745
|
export function getSelf(): Promise<ExtensionInfo>;
|
5744
5746
|
/**
|
5745
5747
|
* Returns information about the calling extension, app, or theme. Note: This function can be used without requesting the 'management' permission in the manifest.
|
5746
|
-
* @since Chrome 39
|
5748
|
+
* @since Chrome 39
|
5747
5749
|
*/
|
5748
5750
|
export function getSelf(callback: (result: ExtensionInfo) => void): void;
|
5749
5751
|
/**
|
5750
5752
|
* Uninstalls the calling extension.
|
5751
5753
|
* Note: This function can be used without requesting the 'management' permission in the manifest.
|
5752
|
-
* @since Chrome 26
|
5754
|
+
* @since Chrome 26
|
5753
5755
|
* @return The `uninstallSelf` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
5754
5756
|
*/
|
5755
5757
|
export function uninstallSelf(options?: UninstallOptions): Promise<void>;
|
5756
5758
|
/**
|
5757
5759
|
* Uninstalls the calling extension.
|
5758
5760
|
* Note: This function can be used without requesting the 'management' permission in the manifest.
|
5759
|
-
* @since Chrome 26
|
5761
|
+
* @since Chrome 26
|
5760
5762
|
*/
|
5761
5763
|
export function uninstallSelf(callback: () => void): void;
|
5762
5764
|
export function uninstallSelf(options: UninstallOptions, callback: () => void): void;
|
5763
5765
|
/**
|
5764
5766
|
* Uninstalls the calling extension.
|
5765
5767
|
* Note: This function can be used without requesting the 'management' permission in the manifest.
|
5766
|
-
* @since Chrome 26
|
5768
|
+
* @since Chrome 26
|
5767
5769
|
* @return The `uninstallSelf` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
5768
5770
|
*/
|
5769
5771
|
export function uninstallSelf(): Promise<void>;
|
5770
5772
|
/**
|
5771
5773
|
* Uninstalls the calling extension.
|
5772
5774
|
* Note: This function can be used without requesting the 'management' permission in the manifest.
|
5773
|
-
* @since Chrome 26
|
5775
|
+
* @since Chrome 26
|
5774
5776
|
*/
|
5775
5777
|
export function uninstallSelf(callback: () => void): void;
|
5776
5778
|
/**
|
5777
5779
|
* Display options to create shortcuts for an app. On Mac, only packaged app shortcuts can be created.
|
5778
|
-
* @since Chrome 37
|
5780
|
+
* @since Chrome 37
|
5779
5781
|
* @return The `createAppShortcut` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
5780
5782
|
*/
|
5781
5783
|
export function createAppShortcut(id: string): Promise<void>;
|
5782
5784
|
/**
|
5783
5785
|
* Display options to create shortcuts for an app. On Mac, only packaged app shortcuts can be created.
|
5784
|
-
* @since Chrome 37
|
5786
|
+
* @since Chrome 37
|
5785
5787
|
*/
|
5786
5788
|
export function createAppShortcut(id: string, callback: () => void): void;
|
5787
5789
|
/**
|
5788
5790
|
* Set the launch type of an app.
|
5789
|
-
* @since Chrome 37
|
5791
|
+
* @since Chrome 37
|
5790
5792
|
* @param id This should be the id from an app item of management.ExtensionInfo.
|
5791
5793
|
* @param launchType The target launch type. Always check and make sure this launch type is in ExtensionInfo.availableLaunchTypes, because the available launch types vary on different platforms and configurations.
|
5792
5794
|
* @return The `setLaunchType` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
@@ -5794,14 +5796,14 @@ declare namespace chrome.management {
|
|
5794
5796
|
export function setLaunchType(id: string, launchType: string): Promise<void>;
|
5795
5797
|
/**
|
5796
5798
|
* Set the launch type of an app.
|
5797
|
-
* @since Chrome 37
|
5799
|
+
* @since Chrome 37
|
5798
5800
|
* @param id This should be the id from an app item of management.ExtensionInfo.
|
5799
5801
|
* @param launchType The target launch type. Always check and make sure this launch type is in ExtensionInfo.availableLaunchTypes, because the available launch types vary on different platforms and configurations.
|
5800
5802
|
*/
|
5801
5803
|
export function setLaunchType(id: string, launchType: string, callback: () => void): void;
|
5802
5804
|
/**
|
5803
5805
|
* Generate an app for a URL. Returns the generated bookmark app.
|
5804
|
-
* @since Chrome 37
|
5806
|
+
* @since Chrome 37
|
5805
5807
|
* @param url The URL of a web page. The scheme of the URL can only be "http" or "https".
|
5806
5808
|
* @param title The title of the generated app.
|
5807
5809
|
* @return The `generateAppForLink` method provides its result via callback or returned as a `Promise` (MV3 only).
|
@@ -5809,7 +5811,7 @@ declare namespace chrome.management {
|
|
5809
5811
|
export function generateAppForLink(url: string, title: string): Promise<ExtensionInfo>;
|
5810
5812
|
/**
|
5811
5813
|
* Generate an app for a URL. Returns the generated bookmark app.
|
5812
|
-
* @since Chrome 37
|
5814
|
+
* @since Chrome 37
|
5813
5815
|
* @param url The URL of a web page. The scheme of the URL can only be "http" or "https".
|
5814
5816
|
* @param title The title of the generated app.
|
5815
5817
|
*/
|
@@ -5832,7 +5834,7 @@ declare namespace chrome.management {
|
|
5832
5834
|
* Use the networking.config API to authenticate to captive portals.
|
5833
5835
|
* Permissions: "networking.config"
|
5834
5836
|
* Important: This API works only on Chrome OS.
|
5835
|
-
* @since Chrome 43
|
5837
|
+
* @since Chrome 43
|
5836
5838
|
*/
|
5837
5839
|
declare namespace chrome.networking.config {
|
5838
5840
|
export interface NetworkInfo {
|
@@ -5881,7 +5883,7 @@ declare namespace chrome.networking.config {
|
|
5881
5883
|
/**
|
5882
5884
|
* Use the chrome.notifications API to create rich notifications using templates and show these notifications to users in the system tray.
|
5883
5885
|
* Permissions: "notifications"
|
5884
|
-
* @since Chrome 28
|
5886
|
+
* @since Chrome 28
|
5885
5887
|
*/
|
5886
5888
|
declare namespace chrome.notifications {
|
5887
5889
|
export type TemplateType = "basic" | "image" | "list" | "progress";
|
@@ -5903,7 +5905,7 @@ declare namespace chrome.notifications {
|
|
5903
5905
|
/**
|
5904
5906
|
* Optional.
|
5905
5907
|
* Alternate notification content with a lower-weight font.
|
5906
|
-
* @since Chrome 31
|
5908
|
+
* @since Chrome 31
|
5907
5909
|
*/
|
5908
5910
|
contextMessage?: string | undefined;
|
5909
5911
|
/** Optional. Priority ranges from -2 to 2. -2 is lowest priority. 2 is highest. Zero is default. */
|
@@ -5917,19 +5919,19 @@ declare namespace chrome.notifications {
|
|
5917
5919
|
/**
|
5918
5920
|
* Optional.
|
5919
5921
|
* Current progress ranges from 0 to 100.
|
5920
|
-
* @since Chrome 30
|
5922
|
+
* @since Chrome 30
|
5921
5923
|
*/
|
5922
5924
|
progress?: number | undefined;
|
5923
5925
|
/**
|
5924
5926
|
* Optional.
|
5925
5927
|
* Whether to show UI indicating that the app will visibly respond to clicks on the body of a notification.
|
5926
|
-
* @since Chrome 32
|
5928
|
+
* @since Chrome 32
|
5927
5929
|
*/
|
5928
5930
|
isClickable?: boolean | undefined;
|
5929
5931
|
/**
|
5930
5932
|
* Optional.
|
5931
5933
|
* 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.
|
5932
|
-
* @since Chrome 38
|
5934
|
+
* @since Chrome 38
|
5933
5935
|
*/
|
5934
5936
|
appIconMaskUrl?: string | undefined;
|
5935
5937
|
/** Optional. A URL to the image thumbnail for image-type notifications. URLs have the same restrictions as iconUrl. */
|
@@ -5997,12 +5999,12 @@ declare namespace chrome.notifications {
|
|
5997
5999
|
export var onButtonClicked: NotificationButtonClickedEvent;
|
5998
6000
|
/**
|
5999
6001
|
* The user changes the permission level.
|
6000
|
-
* @since Chrome 32
|
6002
|
+
* @since Chrome 32
|
6001
6003
|
*/
|
6002
6004
|
export var onPermissionLevelChanged: NotificationPermissionLevelChangedEvent;
|
6003
6005
|
/**
|
6004
6006
|
* The user clicked on a link for the app's notification settings.
|
6005
|
-
* @since Chrome 32
|
6007
|
+
* @since Chrome 32
|
6006
6008
|
*/
|
6007
6009
|
export var onShowSettings: NotificationShowSettingsEvent;
|
6008
6010
|
|
@@ -6049,13 +6051,13 @@ declare namespace chrome.notifications {
|
|
6049
6051
|
export function clear(notificationId: string, callback?: (wasCleared: boolean) => void): void;
|
6050
6052
|
/**
|
6051
6053
|
* Retrieves all the notifications.
|
6052
|
-
* @since Chrome 29
|
6054
|
+
* @since Chrome 29
|
6053
6055
|
* @param callback Returns the set of notification_ids currently in the system.
|
6054
6056
|
*/
|
6055
6057
|
export function getAll(callback: (notifications: Object) => void): void;
|
6056
6058
|
/**
|
6057
6059
|
* Retrieves whether the user has enabled notifications from this app or extension.
|
6058
|
-
* @since Chrome 32
|
6060
|
+
* @since Chrome 32
|
6059
6061
|
* @param callback Returns the current permission level.
|
6060
6062
|
*/
|
6061
6063
|
export function getPermissionLevel(callback: (level: string) => void): void;
|
@@ -6066,7 +6068,7 @@ declare namespace chrome.notifications {
|
|
6066
6068
|
////////////////////
|
6067
6069
|
/**
|
6068
6070
|
* Use the offscreen API to create and manage offscreen documents.
|
6069
|
-
*
|
6071
|
+
* @since Chrome 109, MV3
|
6070
6072
|
* Permissions: "offscreen"
|
6071
6073
|
*/
|
6072
6074
|
declare namespace chrome.offscreen {
|
@@ -6096,6 +6098,10 @@ declare namespace chrome.offscreen {
|
|
6096
6098
|
LOCAL_STORAGE = "LOCAL_STORAGE",
|
6097
6099
|
/** Specifies that the offscreen document needs to spawn workers. */
|
6098
6100
|
WORKERS = "WORKERS",
|
6101
|
+
/** Specifies that the offscreen document needs to use navigator.getBattery. */
|
6102
|
+
BATTERY_STATUS = "BATTERY_STATUS",
|
6103
|
+
/** Specifies that the offscreen document needs to use window.matchMedia. */
|
6104
|
+
MATCH_MEDIA = "MATCH_MEDIA",
|
6099
6105
|
/** Specifies that the offscreen document needs to use navigator.geolocation. */
|
6100
6106
|
GEOLOCATION = "GEOLOCATION",
|
6101
6107
|
}
|
@@ -6152,7 +6158,7 @@ declare namespace chrome.offscreen {
|
|
6152
6158
|
/**
|
6153
6159
|
* The omnibox API allows you to register a keyword with Google Chrome's address bar, which is also known as the omnibox.
|
6154
6160
|
* Manifest: "omnibox": {...}
|
6155
|
-
* @since Chrome 9
|
6161
|
+
* @since Chrome 9
|
6156
6162
|
*/
|
6157
6163
|
declare namespace chrome.omnibox {
|
6158
6164
|
/** A suggest result. */
|
@@ -6163,7 +6169,7 @@ declare namespace chrome.omnibox {
|
|
6163
6169
|
description: string;
|
6164
6170
|
/**
|
6165
6171
|
* Whether the suggest result can be deleted by the user.
|
6166
|
-
* @since Chrome 63
|
6172
|
+
* @since Chrome 63
|
6167
6173
|
*/
|
6168
6174
|
deletable?: boolean | undefined;
|
6169
6175
|
}
|
@@ -6206,7 +6212,7 @@ declare namespace chrome.omnibox {
|
|
6206
6212
|
export var onInputCancelled: OmniboxInputCancelledEvent;
|
6207
6213
|
/**
|
6208
6214
|
* User has deleted a suggested result
|
6209
|
-
* @since Chrome 63
|
6215
|
+
* @since Chrome 63
|
6210
6216
|
*/
|
6211
6217
|
export var onDeleteSuggestion: OmniboxSuggestionDeletedEvent;
|
6212
6218
|
}
|
@@ -6217,7 +6223,7 @@ declare namespace chrome.omnibox {
|
|
6217
6223
|
/**
|
6218
6224
|
* Use the chrome.pageAction API to put icons inside the address bar. Page actions represent actions that can be taken on the current page, but that aren't applicable to all pages.
|
6219
6225
|
* Manifest: "page_action": {...}
|
6220
|
-
* @since Chrome 5
|
6226
|
+
* @since Chrome 5
|
6221
6227
|
*/
|
6222
6228
|
declare namespace chrome.pageAction {
|
6223
6229
|
export interface PageActionClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {}
|
@@ -6285,12 +6291,12 @@ declare namespace chrome.pageAction {
|
|
6285
6291
|
export function setPopup(details: PopupDetails, callback?: () => void): void;
|
6286
6292
|
/**
|
6287
6293
|
* Gets the title of the page action.
|
6288
|
-
* @since Chrome 19
|
6294
|
+
* @since Chrome 19
|
6289
6295
|
*/
|
6290
6296
|
export function getTitle(details: GetDetails, callback: (result: string) => void): void;
|
6291
6297
|
/**
|
6292
6298
|
* Gets the html document set as the popup for this page action.
|
6293
|
-
* @since Chrome 19
|
6299
|
+
* @since Chrome 19
|
6294
6300
|
*/
|
6295
6301
|
export function getPopup(details: GetDetails, callback: (result: string) => void): void;
|
6296
6302
|
/**
|
@@ -6308,7 +6314,7 @@ declare namespace chrome.pageAction {
|
|
6308
6314
|
/**
|
6309
6315
|
* Use the chrome.pageCapture API to save a tab as MHTML.
|
6310
6316
|
* Permissions: "pageCapture"
|
6311
|
-
* @since Chrome 18
|
6317
|
+
* @since Chrome 18
|
6312
6318
|
*/
|
6313
6319
|
declare namespace chrome.pageCapture {
|
6314
6320
|
export interface SaveDetails {
|
@@ -6334,7 +6340,7 @@ declare namespace chrome.pageCapture {
|
|
6334
6340
|
////////////////////
|
6335
6341
|
/**
|
6336
6342
|
* Use the chrome.permissions API to request declared optional permissions at run time rather than install time, so users understand why the permissions are needed and grant only those that are necessary.
|
6337
|
-
* @since Chrome 16
|
6343
|
+
* @since Chrome 16
|
6338
6344
|
*/
|
6339
6345
|
declare namespace chrome.permissions {
|
6340
6346
|
export interface Permissions {
|
@@ -6411,7 +6417,7 @@ declare namespace chrome.permissions {
|
|
6411
6417
|
* Use the chrome.platformKeys API to access client certificates managed by the platform. If the user or policy grants the permission, an extension can use such a certficate in its custom authentication protocol. E.g. this allows usage of platform managed certificates in third party VPNs (see chrome.vpnProvider).
|
6412
6418
|
* Permissions: "platformKeys"
|
6413
6419
|
* Important: This API works only on Chrome OS.
|
6414
|
-
* @since Chrome 45
|
6420
|
+
* @since Chrome 45
|
6415
6421
|
*/
|
6416
6422
|
declare namespace chrome.platformKeys {
|
6417
6423
|
export interface Match {
|
@@ -6484,7 +6490,7 @@ declare namespace chrome.platformKeys {
|
|
6484
6490
|
* Currently, this function only supports the "RSASSA-PKCS1-v1_5" algorithm with one of the hashing algorithms "none", "SHA-1", "SHA-256", "SHA-384", and "SHA-512".
|
6485
6491
|
* @param callback The public and private CryptoKey of a certificate which can only be used with platformKeys.subtleCrypto.
|
6486
6492
|
* Optional parameter privateKey: Might be null if this extension does not have access to it.
|
6487
|
-
* @since Chrome 85
|
6493
|
+
* @since Chrome 85
|
6488
6494
|
*/
|
6489
6495
|
export function getKeyPairBySpki(
|
6490
6496
|
publicKeySpkiDer: ArrayBuffer,
|
@@ -6508,7 +6514,7 @@ declare namespace chrome.platformKeys {
|
|
6508
6514
|
/**
|
6509
6515
|
* Use the chrome.power API to override the system's power management features.
|
6510
6516
|
* Permissions: "power"
|
6511
|
-
* @since Chrome 27
|
6517
|
+
* @since Chrome 27
|
6512
6518
|
*/
|
6513
6519
|
declare namespace chrome.power {
|
6514
6520
|
/** Requests that power management be temporarily disabled. |level| describes the degree to which power management should be disabled. If a request previously made by the same app is still active, it will be replaced by the new request. */
|
@@ -6523,7 +6529,7 @@ declare namespace chrome.power {
|
|
6523
6529
|
/**
|
6524
6530
|
* The chrome.printerProvider API exposes events used by print manager to query printers controlled by extensions, to query their capabilities and to submit print jobs to these printers.
|
6525
6531
|
* Permissions: "printerProvider"
|
6526
|
-
* @since Chrome 44
|
6532
|
+
* @since Chrome 44
|
6527
6533
|
*/
|
6528
6534
|
declare namespace chrome.printerProvider {
|
6529
6535
|
export interface PrinterInfo {
|
@@ -6576,7 +6582,7 @@ declare namespace chrome.printerProvider {
|
|
6576
6582
|
/**
|
6577
6583
|
* Event fired when print manager requests information about a USB device that may be a printer.
|
6578
6584
|
* Note: An application should not rely on this event being fired more than once per device. If a connected device is supported it should be returned in the onGetPrintersRequested event.
|
6579
|
-
* @since Chrome 45
|
6585
|
+
* @since Chrome 45
|
6580
6586
|
*/
|
6581
6587
|
export var onGetUsbPrinterInfoRequested: PrinterInfoRequestedEvent;
|
6582
6588
|
/** Event fired when print manager requests printer capabilities. */
|
@@ -6592,11 +6598,11 @@ declare namespace chrome.printerProvider {
|
|
6592
6598
|
* Use the chrome.privacy API to control usage of the features in Chrome that can affect a user's privacy. This API relies on the ChromeSetting prototype of the type API for getting and setting Chrome's configuration.
|
6593
6599
|
* Permissions: "privacy"
|
6594
6600
|
* The Chrome Privacy Whitepaper gives background detail regarding the features which this API can control.
|
6595
|
-
* @since Chrome 18
|
6601
|
+
* @since Chrome 18
|
6596
6602
|
*/
|
6597
6603
|
declare namespace chrome.privacy {
|
6598
6604
|
export interface Services {
|
6599
|
-
/** since Chrome 20
|
6605
|
+
/** @since Chrome 20 */
|
6600
6606
|
spellingServiceEnabled: chrome.types.ChromeSetting;
|
6601
6607
|
searchSuggestEnabled: chrome.types.ChromeSetting;
|
6602
6608
|
instantEnabled: chrome.types.ChromeSetting;
|
@@ -6605,15 +6611,15 @@ declare namespace chrome.privacy {
|
|
6605
6611
|
/** @deprecated since Chrome 70. Please use privacy.services.autofillAddressEnabled and privacy.services.autofillCreditCardEnabled. */
|
6606
6612
|
autofillEnabled: chrome.types.ChromeSetting;
|
6607
6613
|
translationServiceEnabled: chrome.types.ChromeSetting;
|
6608
|
-
/** @since Chrome 38
|
6614
|
+
/** @since Chrome 38 */
|
6609
6615
|
passwordSavingEnabled: chrome.types.ChromeSetting;
|
6610
|
-
/** @since Chrome 42
|
6616
|
+
/** @since Chrome 42 */
|
6611
6617
|
hotwordSearchEnabled: chrome.types.ChromeSetting;
|
6612
|
-
/** @since Chrome 42
|
6618
|
+
/** @since Chrome 42 */
|
6613
6619
|
safeBrowsingExtendedReportingEnabled: chrome.types.ChromeSetting;
|
6614
|
-
/** @since Chrome 70
|
6620
|
+
/** @since Chrome 70 */
|
6615
6621
|
autofillAddressEnabled: chrome.types.ChromeSetting;
|
6616
|
-
/** @since Chrome 70
|
6622
|
+
/** @since Chrome 70 */
|
6617
6623
|
autofillCreditCardEnabled: chrome.types.ChromeSetting;
|
6618
6624
|
}
|
6619
6625
|
|
@@ -6623,7 +6629,7 @@ declare namespace chrome.privacy {
|
|
6623
6629
|
webRTCMultipleRoutesEnabled: chrome.types.ChromeSetting;
|
6624
6630
|
/** @deprecated since Chrome 48. Please use privacy.network.webRTCIPHandlingPolicy. */
|
6625
6631
|
webRTCNonProxiedUdpEnabled: chrome.types.ChromeSetting;
|
6626
|
-
/** @since Chrome 48
|
6632
|
+
/** @since Chrome 48 */
|
6627
6633
|
webRTCIPHandlingPolicy: chrome.types.ChromeSetting;
|
6628
6634
|
}
|
6629
6635
|
|
@@ -6633,7 +6639,7 @@ declare namespace chrome.privacy {
|
|
6633
6639
|
hyperlinkAuditingEnabled: chrome.types.ChromeSetting;
|
6634
6640
|
/** @since Chrome 21. Available on Windows and ChromeOS only. */
|
6635
6641
|
protectedContentEnabled: chrome.types.ChromeSetting;
|
6636
|
-
/** @since Chrome 65
|
6642
|
+
/** @since Chrome 65 */
|
6637
6643
|
doNotTrackEnabled: chrome.types.ChromeSetting;
|
6638
6644
|
}
|
6639
6645
|
|
@@ -6651,7 +6657,7 @@ declare namespace chrome.privacy {
|
|
6651
6657
|
/**
|
6652
6658
|
* Use the chrome.proxy API to manage Chrome's proxy settings. This API relies on the ChromeSetting prototype of the type API for getting and setting the proxy configuration.
|
6653
6659
|
* Permissions: "proxy"
|
6654
|
-
* @since Chrome 13
|
6660
|
+
* @since Chrome 13
|
6655
6661
|
*/
|
6656
6662
|
declare namespace chrome.proxy {
|
6657
6663
|
/** An object holding proxy auto-config information. Exactly one of the fields should be non-empty. */
|
@@ -6762,8 +6768,9 @@ declare namespace chrome.search {
|
|
6762
6768
|
/**
|
6763
6769
|
* Use the <code>chrome.serial</code> API to read from and write to a device connected to a serial port.
|
6764
6770
|
* Permissions: "enterprise.serial"
|
6765
|
-
*
|
6771
|
+
* @since Chrome 29
|
6766
6772
|
* Important: This API works only on Chrome OS.
|
6773
|
+
* @deprecated Part of the deprecated Chrome Apps platform
|
6767
6774
|
*/
|
6768
6775
|
declare namespace chrome.serial {
|
6769
6776
|
export const DataBits: {
|
@@ -6852,14 +6859,14 @@ declare namespace chrome.serial {
|
|
6852
6859
|
}
|
6853
6860
|
|
6854
6861
|
/**
|
6855
|
-
* @since Chrome 33
|
6862
|
+
* @since Chrome 33
|
6856
6863
|
* @description Returns information about available serial devices on the system. The list is regenerated each time this method is called.
|
6857
6864
|
* @param callback Called with the list of DeviceInfo objects.
|
6858
6865
|
*/
|
6859
6866
|
export function getDevices(callback: (ports: DeviceInfo[]) => void): void;
|
6860
6867
|
|
6861
6868
|
/**
|
6862
|
-
* @since Chrome 33
|
6869
|
+
* @since Chrome 33
|
6863
6870
|
* @description Connects to a given serial port.
|
6864
6871
|
* @param path The system path of the serial port to open.
|
6865
6872
|
* @param options Port configuration options.
|
@@ -6872,7 +6879,7 @@ declare namespace chrome.serial {
|
|
6872
6879
|
): void;
|
6873
6880
|
|
6874
6881
|
/**
|
6875
|
-
* @since Chrome 33
|
6882
|
+
* @since Chrome 33
|
6876
6883
|
* @description Update the option settings on an open serial port connection.
|
6877
6884
|
* @param connectionId The id of the opened connection.
|
6878
6885
|
* @param options Port configuration options.
|
@@ -6881,7 +6888,7 @@ declare namespace chrome.serial {
|
|
6881
6888
|
export function update(connectionId: number, options: ConnectionOptions, callback: (result: boolean) => void): void;
|
6882
6889
|
|
6883
6890
|
/**
|
6884
|
-
* @since Chrome 33
|
6891
|
+
* @since Chrome 33
|
6885
6892
|
* @description Disconnects from a serial port.
|
6886
6893
|
* @param connectionId The id of the opened connection.
|
6887
6894
|
* @param callback Called when the connection has been closed.
|
@@ -6889,7 +6896,7 @@ declare namespace chrome.serial {
|
|
6889
6896
|
export function disconnect(connectionId: number, callback: (result: boolean) => void): void;
|
6890
6897
|
|
6891
6898
|
/**
|
6892
|
-
* @since Chrome 33
|
6899
|
+
* @since Chrome 33
|
6893
6900
|
* @description Pauses or unpauses an open connection.
|
6894
6901
|
* @param connectionId The id of the opened connection.
|
6895
6902
|
* @param paused Flag to indicate whether to pause or unpause.
|
@@ -6898,21 +6905,21 @@ declare namespace chrome.serial {
|
|
6898
6905
|
export function setPaused(connectionId: number, paused: boolean, callback: () => void): void;
|
6899
6906
|
|
6900
6907
|
/**
|
6901
|
-
* @since Chrome 33
|
6908
|
+
* @since Chrome 33
|
6902
6909
|
* @description Retrieves the state of a given connection.
|
6903
6910
|
* @param callback Called with connection state information when available.
|
6904
6911
|
*/
|
6905
6912
|
export function getInfo(callback: (connectionInfos: ConnectionInfo[]) => void): void;
|
6906
6913
|
|
6907
6914
|
/**
|
6908
|
-
* @since Chrome 33
|
6915
|
+
* @since Chrome 33
|
6909
6916
|
* @description Retrieves the list of currently opened serial port connections owned by the application.
|
6910
6917
|
* @param callback Called with the list of connections when available.
|
6911
6918
|
*/
|
6912
6919
|
export function getConnections(callback: (connectionInfos: ConnectionInfo[]) => void): void;
|
6913
6920
|
|
6914
6921
|
/**
|
6915
|
-
* @since Chrome 33
|
6922
|
+
* @since Chrome 33
|
6916
6923
|
* @description Writes data to the given connection.
|
6917
6924
|
* @param connectionId The id of the connection.
|
6918
6925
|
* @param data The data to send.
|
@@ -6945,7 +6952,7 @@ declare namespace chrome.serial {
|
|
6945
6952
|
export function setControlSignals(connectionId: number, signals: object, callback: (result: boolean) => void): void;
|
6946
6953
|
|
6947
6954
|
/**
|
6948
|
-
* @since Chrome 45
|
6955
|
+
* @since Chrome 45
|
6949
6956
|
* @description Suspends character transmission on a given connection and places the transmission line in a break state until the clearBreak is called.
|
6950
6957
|
* @param connectionId The id of the connection.
|
6951
6958
|
* @param callback
|
@@ -6953,7 +6960,7 @@ declare namespace chrome.serial {
|
|
6953
6960
|
export function setBreak(connectionId: number, callback: (result: boolean) => void): void;
|
6954
6961
|
|
6955
6962
|
/**
|
6956
|
-
* @since Chrome 45
|
6963
|
+
* @since Chrome 45
|
6957
6964
|
* @description Restore character transmission on a given connection and place the transmission line in a nonbreak state.
|
6958
6965
|
* @param connectionId The id of the connection.
|
6959
6966
|
* @param callback
|
@@ -6970,7 +6977,7 @@ declare namespace chrome.serial.onReceive {
|
|
6970
6977
|
}
|
6971
6978
|
|
6972
6979
|
/**
|
6973
|
-
* @since Chrome 33
|
6980
|
+
* @since Chrome 33
|
6974
6981
|
* @description Event raised when data has been read from the connection.
|
6975
6982
|
* @param callback
|
6976
6983
|
*/
|
@@ -7007,7 +7014,7 @@ declare namespace chrome.serial.onReceiveError {
|
|
7007
7014
|
}
|
7008
7015
|
|
7009
7016
|
/**
|
7010
|
-
* @since Chrome 33
|
7017
|
+
* @since Chrome 33
|
7011
7018
|
* @description Event raised when an error occurred while the runtime was waiting for data on the serial port.
|
7012
7019
|
* Once this event is raised, the connection may be set to paused. A "timeout" error does not pause the connection.
|
7013
7020
|
* @param callback
|
@@ -7031,13 +7038,13 @@ declare namespace chrome.runtime {
|
|
7031
7038
|
/** The ID of the extension/app. */
|
7032
7039
|
export var id: string;
|
7033
7040
|
|
7034
|
-
/** https://developer.chrome.com/docs/extensions/reference/runtime
|
7035
|
-
export type PlatformOs = "mac" | "win" | "android" | "cros" | "linux" | "openbsd";
|
7036
|
-
/** https://developer.chrome.com/docs/extensions/reference/runtime
|
7041
|
+
/** https://developer.chrome.com/docs/extensions/reference/api/runtime#type-PlatformOs */
|
7042
|
+
export type PlatformOs = "mac" | "win" | "android" | "cros" | "linux" | "openbsd" | "fuchsia";
|
7043
|
+
/** https://developer.chrome.com/docs/extensions/reference/api/runtime#type-PlatformArch */
|
7037
7044
|
export type PlatformArch = "arm" | "arm64" | "x86-32" | "x86-64" | "mips" | "mips64";
|
7038
|
-
/** https://developer.chrome.com/docs/extensions/reference/runtime
|
7045
|
+
/** https://developer.chrome.com/docs/extensions/reference/api/runtime#type-PlatformNaclArch */
|
7039
7046
|
export type PlatformNaclArch = "arm" | "x86-32" | "x86-64" | "mips" | "mips64";
|
7040
|
-
/** https://developer.chrome.com/docs/extensions/reference/api/runtime#type-
|
7047
|
+
/** https://developer.chrome.com/docs/extensions/reference/api/runtime#type-ContextType */
|
7041
7048
|
export enum ContextType {
|
7042
7049
|
TAB = "TAB",
|
7043
7050
|
POPUP = "POPUP",
|
@@ -7045,7 +7052,7 @@ declare namespace chrome.runtime {
|
|
7045
7052
|
OFFSCREEN_DOCUMENT = "OFFSCREEN_DOCUMENT",
|
7046
7053
|
SIDE_PANEL = "SIDE_PANEL",
|
7047
7054
|
}
|
7048
|
-
/** https://developer.chrome.com/docs/extensions/reference/runtime
|
7055
|
+
/** https://developer.chrome.com/docs/extensions/reference/api/runtime#type-OnInstalledReason */
|
7049
7056
|
export enum OnInstalledReason {
|
7050
7057
|
INSTALL = "install",
|
7051
7058
|
UPDATE = "update",
|
@@ -7060,7 +7067,7 @@ declare namespace chrome.runtime {
|
|
7060
7067
|
|
7061
7068
|
/**
|
7062
7069
|
* A filter to match against certain extension contexts. Matching contexts must match all specified filters; any filter that is not specified matches all available contexts. Thus, a filter of `{}` will match all available contexts.
|
7063
|
-
* @since Chrome 114
|
7070
|
+
* @since Chrome 114
|
7064
7071
|
*/
|
7065
7072
|
export interface ContextFilter {
|
7066
7073
|
contextIds?: string[] | undefined;
|
@@ -7092,14 +7099,14 @@ declare namespace chrome.runtime {
|
|
7092
7099
|
/**
|
7093
7100
|
* Optional.
|
7094
7101
|
* Indicates the ID of the imported shared module extension which updated. This is present only if 'reason' is 'shared_module_update'.
|
7095
|
-
* @since Chrome 29
|
7102
|
+
* @since Chrome 29
|
7096
7103
|
*/
|
7097
7104
|
id?: string | undefined;
|
7098
7105
|
}
|
7099
7106
|
|
7100
7107
|
/**
|
7101
7108
|
* A context hosting extension content.
|
7102
|
-
* @since Chrome 114
|
7109
|
+
* @since Chrome 114
|
7103
7110
|
*/
|
7104
7111
|
export interface ExtensionContext {
|
7105
7112
|
/** A unique identifier for this context */
|
@@ -7138,7 +7145,7 @@ declare namespace chrome.runtime {
|
|
7138
7145
|
|
7139
7146
|
/**
|
7140
7147
|
* An object containing information about the script context that sent a message or request.
|
7141
|
-
* @since Chrome 26
|
7148
|
+
* @since Chrome 26
|
7142
7149
|
*/
|
7143
7150
|
export interface MessageSender {
|
7144
7151
|
/** The ID of the extension or app that opened the connection, if any. */
|
@@ -7151,39 +7158,39 @@ declare namespace chrome.runtime {
|
|
7151
7158
|
nativeApplication?: string | undefined;
|
7152
7159
|
/**
|
7153
7160
|
* The frame that opened the connection. 0 for top-level frames, positive for child frames. This will only be set when tab is set.
|
7154
|
-
* @since Chrome 41
|
7161
|
+
* @since Chrome 41
|
7155
7162
|
*/
|
7156
7163
|
frameId?: number | undefined;
|
7157
7164
|
/**
|
7158
7165
|
* The URL of the page or frame that opened the connection. If the sender is in an iframe, it will be iframe's URL not the URL of the page which hosts it.
|
7159
|
-
* @since Chrome 28
|
7166
|
+
* @since Chrome 28
|
7160
7167
|
*/
|
7161
7168
|
url?: string | undefined;
|
7162
7169
|
/**
|
7163
7170
|
* The TLS channel ID of the page or frame that opened the connection, if requested by the extension or app, and if available.
|
7164
|
-
* @since Chrome 32
|
7171
|
+
* @since Chrome 32
|
7165
7172
|
*/
|
7166
7173
|
tlsChannelId?: string | undefined;
|
7167
7174
|
/**
|
7168
7175
|
* The origin of the page or frame that opened the connection. It can vary from the url property (e.g., about:blank) or can be opaque (e.g., sandboxed iframes). This is useful for identifying if the origin can be trusted if we can't immediately tell from the URL.
|
7169
|
-
* @since Chrome 80
|
7176
|
+
* @since Chrome 80
|
7170
7177
|
*/
|
7171
7178
|
origin?: string | undefined;
|
7172
7179
|
/**
|
7173
7180
|
* The lifecycle the document that opened the connection is in at the time the port was created. Note that the lifecycle state of the document may have changed since port creation.
|
7174
|
-
* @since Chrome 106
|
7181
|
+
* @since Chrome 106
|
7175
7182
|
*/
|
7176
7183
|
documentLifecycle?: DocumentLifecycle | undefined;
|
7177
7184
|
/**
|
7178
7185
|
* A UUID of the document that opened the connection.
|
7179
|
-
* @since Chrome 106
|
7186
|
+
* @since Chrome 106
|
7180
7187
|
*/
|
7181
7188
|
documentId?: string | undefined;
|
7182
7189
|
}
|
7183
7190
|
|
7184
7191
|
/**
|
7185
7192
|
* An object containing information about the current platform.
|
7186
|
-
* @since Chrome 36
|
7193
|
+
* @since Chrome 36
|
7187
7194
|
*/
|
7188
7195
|
export interface PlatformInfo {
|
7189
7196
|
/**
|
@@ -7202,7 +7209,7 @@ declare namespace chrome.runtime {
|
|
7202
7209
|
|
7203
7210
|
/**
|
7204
7211
|
* An object which allows two way communication with other pages.
|
7205
|
-
* @since Chrome 26
|
7212
|
+
* @since Chrome 26
|
7206
7213
|
*/
|
7207
7214
|
export interface Port {
|
7208
7215
|
postMessage: (message: any) => void;
|
@@ -7613,22 +7620,27 @@ declare namespace chrome.runtime {
|
|
7613
7620
|
|
7614
7621
|
/**
|
7615
7622
|
* 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.
|
7616
|
-
* @since Chrome 26
|
7623
|
+
* @since Chrome 26
|
7617
7624
|
*/
|
7618
7625
|
export function connect(connectInfo?: ConnectInfo): Port;
|
7619
7626
|
/**
|
7620
7627
|
* 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.
|
7621
|
-
* @since Chrome 26
|
7628
|
+
* @since Chrome 26
|
7622
7629
|
* @param extensionId Optional.
|
7623
7630
|
* The ID of the extension or app to connect to. If omitted, a connection will be attempted with your own extension. Required if sending messages from a web page for web messaging.
|
7624
7631
|
*/
|
7625
7632
|
export function connect(extensionId: string, connectInfo?: ConnectInfo): Port;
|
7626
7633
|
/**
|
7627
7634
|
* Connects to a native application in the host machine.
|
7628
|
-
* @since Chrome 28
|
7635
|
+
* @since Chrome 28
|
7629
7636
|
* @param application The name of the registered application to connect to.
|
7630
7637
|
*/
|
7631
7638
|
export function connectNative(application: string): Port;
|
7639
|
+
/**
|
7640
|
+
* Retrieves the JavaScript 'window' object for the background page running inside the current extension/app. If the background page is an event page, the system will ensure it is loaded before calling the callback. If there is no background page, an error is set.
|
7641
|
+
* @since MV3
|
7642
|
+
*/
|
7643
|
+
export function getBackgroundPage(): Promise<Window>;
|
7632
7644
|
/** Retrieves the JavaScript 'window' object for the background page running inside the current extension/app. If the background page is an event page, the system will ensure it is loaded before calling the callback. If there is no background page, an error is set. */
|
7633
7645
|
export function getBackgroundPage(callback: (backgroundPage?: Window) => void): void;
|
7634
7646
|
/**
|
@@ -7653,18 +7665,18 @@ declare namespace chrome.runtime {
|
|
7653
7665
|
export function getManifest(): Manifest;
|
7654
7666
|
/**
|
7655
7667
|
* Returns a DirectoryEntry for the package directory.
|
7656
|
-
* @since Chrome 29
|
7668
|
+
* @since Chrome 29
|
7657
7669
|
*/
|
7658
7670
|
export function getPackageDirectoryEntry(callback: (directoryEntry: DirectoryEntry) => void): void;
|
7659
7671
|
/**
|
7660
7672
|
* Returns information about the current platform.
|
7661
|
-
* @since Chrome 29
|
7673
|
+
* @since Chrome 29
|
7662
7674
|
* @param callback Called with results
|
7663
7675
|
*/
|
7664
7676
|
export function getPlatformInfo(callback: (platformInfo: PlatformInfo) => void): void;
|
7665
7677
|
/**
|
7666
7678
|
* Returns information about the current platform.
|
7667
|
-
* @since Chrome 29
|
7679
|
+
* @since Chrome 29
|
7668
7680
|
* @return The `getPlatformInfo` method provides its result via callback or returned as a `Promise` (MV3 only).
|
7669
7681
|
*/
|
7670
7682
|
export function getPlatformInfo(): Promise<PlatformInfo>;
|
@@ -7675,18 +7687,18 @@ declare namespace chrome.runtime {
|
|
7675
7687
|
export function getURL(path: string): string;
|
7676
7688
|
/**
|
7677
7689
|
* Reloads the app or extension.
|
7678
|
-
* @since Chrome 25
|
7690
|
+
* @since Chrome 25
|
7679
7691
|
*/
|
7680
7692
|
export function reload(): void;
|
7681
7693
|
/**
|
7682
7694
|
* Requests an update check for this app/extension.
|
7683
7695
|
* @since Chrome 109
|
7684
|
-
* @return This only returns a Promise when the callback parameter is not specified, and with MV3
|
7696
|
+
* @return This only returns a Promise when the callback parameter is not specified, and with MV3.
|
7685
7697
|
*/
|
7686
7698
|
export function requestUpdateCheck(): Promise<RequestUpdateCheckResult>;
|
7687
7699
|
/**
|
7688
7700
|
* Requests an update check for this app/extension.
|
7689
|
-
* @since Chrome 25
|
7701
|
+
* @since Chrome 25
|
7690
7702
|
* @param callback
|
7691
7703
|
* Parameter status: Result of the update check. One of: "throttled", "no_update", or "update_available"
|
7692
7704
|
* Optional parameter details: If an update is available, this contains more information about the available update.
|
@@ -7696,7 +7708,7 @@ declare namespace chrome.runtime {
|
|
7696
7708
|
): void;
|
7697
7709
|
/**
|
7698
7710
|
* Restart the ChromeOS device when the app runs in kiosk mode. Otherwise, it's no-op.
|
7699
|
-
* @since Chrome 32
|
7711
|
+
* @since Chrome 32
|
7700
7712
|
*/
|
7701
7713
|
export function restart(): void;
|
7702
7714
|
/**
|
@@ -7705,20 +7717,20 @@ declare namespace chrome.runtime {
|
|
7705
7717
|
* be delayed. If called with a value of -1, the reboot will be
|
7706
7718
|
* cancelled. It's a no-op in non-kiosk mode. It's only allowed to be
|
7707
7719
|
* called repeatedly by the first extension to invoke this API.
|
7708
|
-
* @since Chrome 53
|
7720
|
+
* @since Chrome 53
|
7709
7721
|
* @param seconds
|
7710
7722
|
* @param callback
|
7711
7723
|
*/
|
7712
7724
|
export function restartAfterDelay(seconds: number, callback?: () => void): void;
|
7713
7725
|
/**
|
7714
7726
|
* 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.
|
7715
|
-
* @since Chrome 26
|
7727
|
+
* @since Chrome 26
|
7716
7728
|
* 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.
|
7717
7729
|
*/
|
7718
7730
|
export function sendMessage<M = any, R = any>(message: M, responseCallback: (response: R) => void): void;
|
7719
7731
|
/**
|
7720
7732
|
* 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.
|
7721
|
-
* @since Chrome 32
|
7733
|
+
* @since Chrome 32
|
7722
7734
|
* 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.
|
7723
7735
|
*/
|
7724
7736
|
export function sendMessage<M = any, R = any>(
|
@@ -7728,7 +7740,7 @@ declare namespace chrome.runtime {
|
|
7728
7740
|
): void;
|
7729
7741
|
/**
|
7730
7742
|
* 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.
|
7731
|
-
* @since Chrome 26
|
7743
|
+
* @since Chrome 26
|
7732
7744
|
* @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.
|
7733
7745
|
* 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.
|
7734
7746
|
*/
|
@@ -7739,7 +7751,7 @@ declare namespace chrome.runtime {
|
|
7739
7751
|
): void;
|
7740
7752
|
/**
|
7741
7753
|
* 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.
|
7742
|
-
* @since Chrome 32
|
7754
|
+
* @since Chrome 32
|
7743
7755
|
* @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.
|
7744
7756
|
* 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.
|
7745
7757
|
*/
|
@@ -7751,12 +7763,12 @@ declare namespace chrome.runtime {
|
|
7751
7763
|
): void;
|
7752
7764
|
/**
|
7753
7765
|
* 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.
|
7754
|
-
* @since Chrome 26
|
7766
|
+
* @since Chrome 26
|
7755
7767
|
*/
|
7756
7768
|
export function sendMessage<M = any, R = any>(message: M): Promise<R>;
|
7757
7769
|
/**
|
7758
7770
|
* 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.
|
7759
|
-
* @since Chrome 32
|
7771
|
+
* @since Chrome 32
|
7760
7772
|
*/
|
7761
7773
|
export function sendMessage<M = any, R = any>(
|
7762
7774
|
message: M,
|
@@ -7764,13 +7776,13 @@ declare namespace chrome.runtime {
|
|
7764
7776
|
): Promise<R>;
|
7765
7777
|
/**
|
7766
7778
|
* 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.
|
7767
|
-
* @since Chrome 26
|
7779
|
+
* @since Chrome 26
|
7768
7780
|
* @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.
|
7769
7781
|
*/
|
7770
7782
|
export function sendMessage<M = any, R = any>(extensionId: string | undefined | null, message: M): Promise<R>;
|
7771
7783
|
/**
|
7772
7784
|
* 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.
|
7773
|
-
* @since Chrome 32
|
7785
|
+
* @since Chrome 32
|
7774
7786
|
* @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.
|
7775
7787
|
*/
|
7776
7788
|
export function sendMessage<Message = any, Response = any>(
|
@@ -7780,7 +7792,7 @@ declare namespace chrome.runtime {
|
|
7780
7792
|
): Promise<Response>;
|
7781
7793
|
/**
|
7782
7794
|
* Send a single message to a native application.
|
7783
|
-
* @since Chrome 28
|
7795
|
+
* @since Chrome 28
|
7784
7796
|
* @param application The of the native messaging host.
|
7785
7797
|
* @param message The message that will be passed to the native messaging host.
|
7786
7798
|
* Parameter response: The response message sent by the native messaging host. If an error occurs while connecting to the native messaging host, the callback will be called with no arguments and runtime.lastError will be set to the error message.
|
@@ -7792,7 +7804,7 @@ declare namespace chrome.runtime {
|
|
7792
7804
|
): void;
|
7793
7805
|
/**
|
7794
7806
|
* Send a single message to a native application.
|
7795
|
-
* @since Chrome 28
|
7807
|
+
* @since Chrome 28
|
7796
7808
|
* @param application The of the native messaging host.
|
7797
7809
|
* @param message The message that will be passed to the native messaging host.
|
7798
7810
|
*/
|
@@ -7802,7 +7814,7 @@ declare namespace chrome.runtime {
|
|
7802
7814
|
): Promise<any>;
|
7803
7815
|
/**
|
7804
7816
|
* 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.
|
7805
|
-
* @since Chrome 41
|
7817
|
+
* @since Chrome 41
|
7806
7818
|
* @param url Since Chrome 34.
|
7807
7819
|
* URL to be opened after the extension is uninstalled. This URL must have an http: or https: scheme. Set an empty string to not open a new tab upon uninstallation.
|
7808
7820
|
* @param callback Called when the uninstall URL is set. If the given URL is invalid, runtime.lastError will be set.
|
@@ -7812,25 +7824,32 @@ declare namespace chrome.runtime {
|
|
7812
7824
|
* Open your Extension's options page, if possible.
|
7813
7825
|
* The precise behavior may depend on your manifest's options_ui or options_page key, or what Chrome happens to support at the time. For example, the page may be opened in a new tab, within chrome://extensions, within an App, or it may just focus an open options page. It will never cause the caller page to reload.
|
7814
7826
|
* If your Extension does not declare an options page, or Chrome failed to create one for some other reason, the callback will set lastError.
|
7815
|
-
* @since
|
7827
|
+
* @since MV3
|
7828
|
+
*/
|
7829
|
+
export function openOptionsPage(): Promise<void>;
|
7830
|
+
/**
|
7831
|
+
* Open your Extension's options page, if possible.
|
7832
|
+
* The precise behavior may depend on your manifest's options_ui or options_page key, or what Chrome happens to support at the time. For example, the page may be opened in a new tab, within chrome://extensions, within an App, or it may just focus an open options page. It will never cause the caller page to reload.
|
7833
|
+
* If your Extension does not declare an options page, or Chrome failed to create one for some other reason, the callback will set lastError.
|
7834
|
+
* @since Chrome 42
|
7816
7835
|
*/
|
7817
7836
|
export function openOptionsPage(callback?: () => void): void;
|
7818
7837
|
|
7819
7838
|
/**
|
7820
7839
|
* Fired when a connection is made from either an extension process or a content script.
|
7821
|
-
* @since Chrome 26
|
7840
|
+
* @since Chrome 26
|
7822
7841
|
*/
|
7823
7842
|
export var onConnect: ExtensionConnectEvent;
|
7824
7843
|
/**
|
7825
7844
|
* Fired when a connection is made from another extension.
|
7826
|
-
* @since Chrome 26
|
7845
|
+
* @since Chrome 26
|
7827
7846
|
*/
|
7828
7847
|
export var onConnectExternal: ExtensionConnectEvent;
|
7829
7848
|
/** Sent to the event page just before it is unloaded. This gives the extension opportunity to do some clean up. Note that since the page is unloading, any asynchronous operations started while handling this event are not guaranteed to complete. If more activity for the event page occurs before it gets unloaded the onSuspendCanceled event will be sent and the page won't be unloaded. */
|
7830
7849
|
export var onSuspend: RuntimeEvent;
|
7831
7850
|
/**
|
7832
7851
|
* Fired when a profile that has this extension installed first starts up. This event is not fired when an incognito profile is started, even if this extension is operating in 'split' incognito mode.
|
7833
|
-
* @since Chrome 23
|
7852
|
+
* @since Chrome 23
|
7834
7853
|
*/
|
7835
7854
|
export var onStartup: RuntimeEvent;
|
7836
7855
|
/** Fired when the extension is first installed, when the extension is updated to a new version, and when Chrome is updated to a new version. */
|
@@ -7839,22 +7858,22 @@ declare namespace chrome.runtime {
|
|
7839
7858
|
export var onSuspendCanceled: RuntimeEvent;
|
7840
7859
|
/**
|
7841
7860
|
* Fired when a message is sent from either an extension process or a content script.
|
7842
|
-
* @since Chrome 26
|
7861
|
+
* @since Chrome 26
|
7843
7862
|
*/
|
7844
7863
|
export var onMessage: ExtensionMessageEvent;
|
7845
7864
|
/**
|
7846
7865
|
* Fired when a message is sent from another extension/app. Cannot be used in a content script.
|
7847
|
-
* @since Chrome 26
|
7866
|
+
* @since Chrome 26
|
7848
7867
|
*/
|
7849
7868
|
export var onMessageExternal: ExtensionMessageEvent;
|
7850
7869
|
/**
|
7851
7870
|
* Fired when an app or the device that it runs on needs to be restarted. The app should close all its windows at its earliest convenient time to let the restart to happen. If the app does nothing, a restart will be enforced after a 24-hour grace period has passed. Currently, this event is only fired for Chrome OS kiosk apps.
|
7852
|
-
* @since Chrome 29
|
7871
|
+
* @since Chrome 29
|
7853
7872
|
*/
|
7854
7873
|
export var onRestartRequired: RuntimeRestartRequiredEvent;
|
7855
7874
|
/**
|
7856
7875
|
* Fired when an update is available, but isn't installed immediately because the app is currently running. If you do nothing, the update will be installed the next time the background page gets unloaded, if you want it to be installed sooner you can explicitly call chrome.runtime.reload(). If your extension is using a persistent background page, the background page of course never gets unloaded, so unless you call chrome.runtime.reload() manually in response to this event the update will not get installed until the next time chrome itself restarts. If no handlers are listening for this event, and your extension has a persistent background page, it behaves as if chrome.runtime.reload() is called in response to this event.
|
7857
|
-
* @since Chrome 25
|
7876
|
+
* @since Chrome 25
|
7858
7877
|
*/
|
7859
7878
|
export var onUpdateAvailable: RuntimeUpdateAvailableEvent;
|
7860
7879
|
/**
|
@@ -7869,8 +7888,8 @@ declare namespace chrome.runtime {
|
|
7869
7888
|
////////////////////
|
7870
7889
|
/**
|
7871
7890
|
* Use the chrome.scripting API to execute script in different contexts.
|
7872
|
-
* Permissions: "scripting"
|
7873
|
-
* @since Chrome 88
|
7891
|
+
* Permissions: "scripting"
|
7892
|
+
* @since Chrome 88, MV3
|
7874
7893
|
*/
|
7875
7894
|
declare namespace chrome.scripting {
|
7876
7895
|
/* The CSS style origin for a style change. */
|
@@ -7882,12 +7901,12 @@ declare namespace chrome.scripting {
|
|
7882
7901
|
export interface InjectionResult<T extends any = any> {
|
7883
7902
|
/**
|
7884
7903
|
* The document associated with the injection.
|
7885
|
-
* @since Chrome 106
|
7904
|
+
* @since Chrome 106
|
7886
7905
|
*/
|
7887
7906
|
documentId: string;
|
7888
7907
|
/**
|
7889
7908
|
* The frame associated with the injection.
|
7890
|
-
* @since Chrome 90
|
7909
|
+
* @since Chrome 90
|
7891
7910
|
*/
|
7892
7911
|
frameId: number;
|
7893
7912
|
/* The result of the script execution. */
|
@@ -7899,7 +7918,7 @@ declare namespace chrome.scripting {
|
|
7899
7918
|
allFrames?: boolean | undefined;
|
7900
7919
|
/**
|
7901
7920
|
* The IDs of specific documentIds to inject into. This must not be set if frameIds is set.
|
7902
|
-
* @since Chrome 106
|
7921
|
+
* @since Chrome 106
|
7903
7922
|
*/
|
7904
7923
|
documentIds?: string[] | undefined;
|
7905
7924
|
/* The IDs of specific frames to inject into. */
|
@@ -8012,7 +8031,7 @@ declare namespace chrome.scripting {
|
|
8012
8031
|
* The details of the styles to remove.
|
8013
8032
|
* Note that the css, files, and origin properties must exactly match the stylesheet inserted through `insertCSS`.
|
8014
8033
|
* Attempting to remove a non-existent stylesheet is a no-op.
|
8015
|
-
* @return This only returns a Promise when the callback parameter is not specified, and with MV3
|
8034
|
+
* @return This only returns a Promise when the callback parameter is not specified, and with MV3.
|
8016
8035
|
* @since Chrome 90
|
8017
8036
|
*/
|
8018
8037
|
export function removeCSS(injection: CSSInjection): Promise<void>;
|
@@ -8122,7 +8141,7 @@ declare namespace chrome.scriptBadge {
|
|
8122
8141
|
/**
|
8123
8142
|
* Use the chrome.sessions API to query and restore tabs and windows from a browsing session.
|
8124
8143
|
* Permissions: "sessions"
|
8125
|
-
* @since Chrome 37
|
8144
|
+
* @since Chrome 37
|
8126
8145
|
*/
|
8127
8146
|
declare namespace chrome.sessions {
|
8128
8147
|
export interface Filter {
|
@@ -8226,7 +8245,7 @@ declare namespace chrome.sessions {
|
|
8226
8245
|
/**
|
8227
8246
|
* Use the chrome.storage API to store, retrieve, and track changes to user data.
|
8228
8247
|
* Permissions: "storage"
|
8229
|
-
* @since Chrome 20
|
8248
|
+
* @since Chrome 20
|
8230
8249
|
*/
|
8231
8250
|
declare namespace chrome.storage {
|
8232
8251
|
export interface StorageArea {
|
@@ -8371,7 +8390,7 @@ declare namespace chrome.storage {
|
|
8371
8390
|
/**
|
8372
8391
|
* The maximum number of set, remove, or clear operations that can be performed each minute. This is 2 per second, providing higher throughput than writes-per-hour over a shorter period of time.
|
8373
8392
|
* Updates that would cause this limit to be exceeded fail immediately and set runtime.lastError.
|
8374
|
-
* @since Chrome 40
|
8393
|
+
* @since Chrome 40
|
8375
8394
|
*/
|
8376
8395
|
MAX_WRITE_OPERATIONS_PER_MINUTE: number;
|
8377
8396
|
}
|
@@ -8405,13 +8424,13 @@ declare namespace chrome.storage {
|
|
8405
8424
|
|
8406
8425
|
/**
|
8407
8426
|
* Items in the managed storage area are set by the domain administrator, and are read-only for the extension; trying to modify this namespace results in an error.
|
8408
|
-
* @since Chrome 33
|
8427
|
+
* @since Chrome 33
|
8409
8428
|
*/
|
8410
8429
|
export var managed: StorageArea;
|
8411
8430
|
|
8412
8431
|
/**
|
8413
8432
|
* Items in the session storage area are stored in-memory and will not be persisted to disk.
|
8414
|
-
* @since Chrome 102
|
8433
|
+
* @since Chrome 102
|
8415
8434
|
*/
|
8416
8435
|
export var session: SessionStorageArea;
|
8417
8436
|
|
@@ -8422,6 +8441,9 @@ declare namespace chrome.storage {
|
|
8422
8441
|
////////////////////
|
8423
8442
|
// Socket
|
8424
8443
|
////////////////////
|
8444
|
+
/**
|
8445
|
+
* @deprecated Part of the deprecated Chrome Apps platform
|
8446
|
+
*/
|
8425
8447
|
declare namespace chrome.socket {
|
8426
8448
|
export interface CreateInfo {
|
8427
8449
|
socketId: number;
|
@@ -8506,7 +8528,7 @@ declare namespace chrome.socket {
|
|
8506
8528
|
/**
|
8507
8529
|
* Use the system.cpu API to query CPU metadata.
|
8508
8530
|
* Permissions: "system.cpu"
|
8509
|
-
* @since Chrome 32
|
8531
|
+
* @since Chrome 32
|
8510
8532
|
*/
|
8511
8533
|
declare namespace chrome.system.cpu {
|
8512
8534
|
export interface ProcessorUsage {
|
@@ -8557,7 +8579,7 @@ declare namespace chrome.system.cpu {
|
|
8557
8579
|
/**
|
8558
8580
|
* The chrome.system.memory API.
|
8559
8581
|
* Permissions: "system.memory"
|
8560
|
-
* @since Chrome 32
|
8582
|
+
* @since Chrome 32
|
8561
8583
|
*/
|
8562
8584
|
declare namespace chrome.system.memory {
|
8563
8585
|
export interface MemoryInfo {
|
@@ -8583,7 +8605,7 @@ declare namespace chrome.system.memory {
|
|
8583
8605
|
/**
|
8584
8606
|
* Use the chrome.system.storage API to query storage device information and be notified when a removable storage device is attached and detached.
|
8585
8607
|
* Permissions: "system.storage"
|
8586
|
-
* @since Chrome 30
|
8608
|
+
* @since Chrome 30
|
8587
8609
|
*/
|
8588
8610
|
declare namespace chrome.system.storage {
|
8589
8611
|
export interface StorageUnitInfo {
|
@@ -8657,7 +8679,7 @@ declare namespace chrome.system.storage {
|
|
8657
8679
|
/**
|
8658
8680
|
* Use the system.display API to query display metadata.
|
8659
8681
|
* Permissions: 'system.display'
|
8660
|
-
* @since Chrome 30
|
8682
|
+
* @since Chrome 30
|
8661
8683
|
*/
|
8662
8684
|
declare namespace chrome.system.display {
|
8663
8685
|
export const DisplayPosition: {
|
@@ -8859,7 +8881,7 @@ declare namespace chrome.system.display {
|
|
8859
8881
|
displayMode?: DisplayMode | undefined;
|
8860
8882
|
|
8861
8883
|
/**
|
8862
|
-
* @since Chrome 65
|
8884
|
+
* @since Chrome 65
|
8863
8885
|
* @description
|
8864
8886
|
* If set, updates the zoom associated with the display.
|
8865
8887
|
* This zoom performs re-layout and repaint thus resulting
|
@@ -9163,7 +9185,7 @@ declare namespace chrome.system.display {
|
|
9163
9185
|
|
9164
9186
|
/**
|
9165
9187
|
* requires(CrOS Kiosk app) Chrome OS Kiosk apps only
|
9166
|
-
* @since Chrome 65
|
9188
|
+
* @since Chrome 65
|
9167
9189
|
* @description
|
9168
9190
|
* Sets the display mode to the specified mirror mode.
|
9169
9191
|
* Each call resets the state from previous calls.
|
@@ -9174,7 +9196,7 @@ declare namespace chrome.system.display {
|
|
9174
9196
|
|
9175
9197
|
/**
|
9176
9198
|
* requires(CrOS Kiosk app) Chrome OS Kiosk apps only
|
9177
|
-
* @since Chrome 65
|
9199
|
+
* @since Chrome 65
|
9178
9200
|
* @description
|
9179
9201
|
* Sets the display mode to the specified mirror mode.
|
9180
9202
|
* Each call resets the state from previous calls.
|
@@ -9196,7 +9218,7 @@ declare namespace chrome.system.display {
|
|
9196
9218
|
/**
|
9197
9219
|
* Use the chrome.tabCapture API to interact with tab media streams.
|
9198
9220
|
* Permissions: "tabCapture"
|
9199
|
-
* @since Chrome 31
|
9221
|
+
* @since Chrome 31
|
9200
9222
|
*/
|
9201
9223
|
declare namespace chrome.tabCapture {
|
9202
9224
|
export interface CaptureInfo {
|
@@ -9265,12 +9287,12 @@ declare namespace chrome.tabCapture {
|
|
9265
9287
|
/**
|
9266
9288
|
* Use the chrome.tabs API to interact with the browser's tab system. You can use this API to create, modify, and rearrange tabs in the browser.
|
9267
9289
|
* Permissions: The majority of the chrome.tabs API can be used without declaring any permission. However, the "tabs" permission is required in order to populate the url, title, and favIconUrl properties of Tab.
|
9268
|
-
* @since Chrome 5
|
9290
|
+
* @since Chrome 5
|
9269
9291
|
*/
|
9270
9292
|
declare namespace chrome.tabs {
|
9271
9293
|
/**
|
9272
9294
|
* Tab muted state and the reason for the last state change.
|
9273
|
-
* @since Chrome 46
|
9295
|
+
* @since Chrome 46
|
9274
9296
|
*/
|
9275
9297
|
export interface MutedInfo {
|
9276
9298
|
/** Whether the tab is prevented from playing sound (but hasn't necessarily recently produced sound). Equivalent to whether the muted audio indicator is showing. */
|
@@ -9301,7 +9323,7 @@ declare namespace chrome.tabs {
|
|
9301
9323
|
/**
|
9302
9324
|
* Optional.
|
9303
9325
|
* The ID of the tab that opened this tab, if any. This property is only present if the opener tab still exists.
|
9304
|
-
* @since Chrome 18
|
9326
|
+
* @since Chrome 18
|
9305
9327
|
*/
|
9306
9328
|
openerTabId?: number | undefined;
|
9307
9329
|
/**
|
@@ -9317,24 +9339,24 @@ declare namespace chrome.tabs {
|
|
9317
9339
|
/**
|
9318
9340
|
* The URL the tab is navigating to, before it has committed.
|
9319
9341
|
* This property is only present if the extension's manifest includes the "tabs" permission and there is a pending navigation.
|
9320
|
-
* @since Chrome 79
|
9342
|
+
* @since Chrome 79
|
9321
9343
|
*/
|
9322
9344
|
pendingUrl?: string | undefined;
|
9323
9345
|
/**
|
9324
9346
|
* Whether the tab is pinned.
|
9325
|
-
* @since Chrome 9
|
9347
|
+
* @since Chrome 9
|
9326
9348
|
*/
|
9327
9349
|
pinned: boolean;
|
9328
9350
|
/**
|
9329
9351
|
* Whether the tab is highlighted.
|
9330
|
-
* @since Chrome 16
|
9352
|
+
* @since Chrome 16
|
9331
9353
|
*/
|
9332
9354
|
highlighted: boolean;
|
9333
9355
|
/** The ID of the window the tab is contained within. */
|
9334
9356
|
windowId: number;
|
9335
9357
|
/**
|
9336
9358
|
* Whether the tab is active in its window. (Does not necessarily mean the window is focused.)
|
9337
|
-
* @since Chrome 16
|
9359
|
+
* @since Chrome 16
|
9338
9360
|
*/
|
9339
9361
|
active: boolean;
|
9340
9362
|
/**
|
@@ -9357,38 +9379,38 @@ declare namespace chrome.tabs {
|
|
9357
9379
|
/**
|
9358
9380
|
* Optional.
|
9359
9381
|
* Whether the tab has produced sound over the past couple of seconds (but it might not be heard if also muted). Equivalent to whether the speaker audio indicator is showing.
|
9360
|
-
* @since Chrome 45
|
9382
|
+
* @since Chrome 45
|
9361
9383
|
*/
|
9362
9384
|
audible?: boolean | undefined;
|
9363
9385
|
/**
|
9364
9386
|
* Whether the tab is discarded. A discarded tab is one whose content has been unloaded from memory, but is still visible in the tab strip. Its content gets reloaded the next time it's activated.
|
9365
|
-
* @since Chrome 54
|
9387
|
+
* @since Chrome 54
|
9366
9388
|
*/
|
9367
9389
|
discarded: boolean;
|
9368
9390
|
/**
|
9369
9391
|
* Whether the tab can be discarded automatically by the browser when resources are low.
|
9370
|
-
* @since Chrome 54
|
9392
|
+
* @since Chrome 54
|
9371
9393
|
*/
|
9372
9394
|
autoDiscardable: boolean;
|
9373
9395
|
/**
|
9374
9396
|
* Optional.
|
9375
9397
|
* Current tab muted state and the reason for the last state change.
|
9376
|
-
* @since Chrome 46
|
9398
|
+
* @since Chrome 46
|
9377
9399
|
*/
|
9378
9400
|
mutedInfo?: MutedInfo | undefined;
|
9379
9401
|
/**
|
9380
9402
|
* Optional. The width of the tab in pixels.
|
9381
|
-
* @since Chrome 31
|
9403
|
+
* @since Chrome 31
|
9382
9404
|
*/
|
9383
9405
|
width?: number | undefined;
|
9384
9406
|
/**
|
9385
9407
|
* Optional. The height of the tab in pixels.
|
9386
|
-
* @since Chrome 31
|
9408
|
+
* @since Chrome 31
|
9387
9409
|
*/
|
9388
9410
|
height?: number | undefined;
|
9389
9411
|
/**
|
9390
9412
|
* Optional. The session ID used to uniquely identify a Tab obtained from the sessions API.
|
9391
|
-
* @since Chrome 31
|
9413
|
+
* @since Chrome 31
|
9392
9414
|
*/
|
9393
9415
|
sessionId?: string | undefined;
|
9394
9416
|
/**
|
@@ -9396,11 +9418,16 @@ declare namespace chrome.tabs {
|
|
9396
9418
|
* @since Chrome 88
|
9397
9419
|
*/
|
9398
9420
|
groupId: number;
|
9421
|
+
/**
|
9422
|
+
* The last time the tab was accessed as the number of milliseconds since epoch.
|
9423
|
+
* @since Chrome 121
|
9424
|
+
*/
|
9425
|
+
lastAccessed?: number | undefined;
|
9399
9426
|
}
|
9400
9427
|
|
9401
9428
|
/**
|
9402
9429
|
* Defines how zoom changes in a tab are handled and at what scope.
|
9403
|
-
* @since Chrome 38
|
9430
|
+
* @since Chrome 38
|
9404
9431
|
*/
|
9405
9432
|
export interface ZoomSettings {
|
9406
9433
|
/**
|
@@ -9421,7 +9448,7 @@ declare namespace chrome.tabs {
|
|
9421
9448
|
/**
|
9422
9449
|
* Optional.
|
9423
9450
|
* Used to return the default zoom level for the current tab in calls to tabs.getZoomSettings.
|
9424
|
-
* @since Chrome 43
|
9451
|
+
* @since Chrome 43
|
9425
9452
|
*/
|
9426
9453
|
defaultZoomFactor?: number | undefined;
|
9427
9454
|
}
|
@@ -9440,7 +9467,7 @@ declare namespace chrome.tabs {
|
|
9440
9467
|
/**
|
9441
9468
|
* Optional. The soonest that the JavaScript or CSS will be injected into the tab.
|
9442
9469
|
* One of: "document_start", "document_end", or "document_idle"
|
9443
|
-
* @since Chrome 20
|
9470
|
+
* @since Chrome 20
|
9444
9471
|
*/
|
9445
9472
|
runAt?: string | undefined;
|
9446
9473
|
/** Optional. JavaScript or CSS file to inject. */
|
@@ -9448,19 +9475,19 @@ declare namespace chrome.tabs {
|
|
9448
9475
|
/**
|
9449
9476
|
* Optional.
|
9450
9477
|
* The frame where the script or CSS should be injected. Defaults to 0 (the top-level frame).
|
9451
|
-
* @since Chrome 39
|
9478
|
+
* @since Chrome 39
|
9452
9479
|
*/
|
9453
9480
|
frameId?: number | undefined;
|
9454
9481
|
/**
|
9455
9482
|
* Optional.
|
9456
9483
|
* If matchAboutBlank is true, then the code is also injected in about:blank and about:srcdoc frames if your extension has access to its parent document. Code cannot be inserted in top-level about:-frames. By default it is false.
|
9457
|
-
* @since Chrome 39
|
9484
|
+
* @since Chrome 39
|
9458
9485
|
*/
|
9459
9486
|
matchAboutBlank?: boolean | undefined;
|
9460
9487
|
/**
|
9461
9488
|
* Optional. The origin of the CSS to inject. This may only be specified for CSS, not JavaScript. Defaults to "author".
|
9462
9489
|
* One of: "author", or "user"
|
9463
|
-
* @since Chrome 66
|
9490
|
+
* @since Chrome 66
|
9464
9491
|
*/
|
9465
9492
|
cssOrigin?: string | undefined;
|
9466
9493
|
}
|
@@ -9471,7 +9498,7 @@ declare namespace chrome.tabs {
|
|
9471
9498
|
/**
|
9472
9499
|
* Optional.
|
9473
9500
|
* The ID of the tab that opened this tab. If specified, the opener tab must be in the same window as the newly created tab.
|
9474
|
-
* @since Chrome 18
|
9501
|
+
* @since Chrome 18
|
9475
9502
|
*/
|
9476
9503
|
openerTabId?: number | undefined;
|
9477
9504
|
/**
|
@@ -9481,7 +9508,7 @@ declare namespace chrome.tabs {
|
|
9481
9508
|
url?: string | undefined;
|
9482
9509
|
/**
|
9483
9510
|
* Optional. Whether the tab should be pinned. Defaults to false
|
9484
|
-
* @since Chrome 9
|
9511
|
+
* @since Chrome 9
|
9485
9512
|
*/
|
9486
9513
|
pinned?: boolean | undefined;
|
9487
9514
|
/** Optional. The window to create the new tab in. Defaults to the current window. */
|
@@ -9489,7 +9516,7 @@ declare namespace chrome.tabs {
|
|
9489
9516
|
/**
|
9490
9517
|
* Optional.
|
9491
9518
|
* Whether the tab should become the active tab in the window. Does not affect whether the window is focused (see windows.update). Defaults to true.
|
9492
|
-
* @since Chrome 16
|
9519
|
+
* @since Chrome 16
|
9493
9520
|
*/
|
9494
9521
|
active?: boolean | undefined;
|
9495
9522
|
/**
|
@@ -9509,24 +9536,24 @@ declare namespace chrome.tabs {
|
|
9509
9536
|
export interface UpdateProperties {
|
9510
9537
|
/**
|
9511
9538
|
* Optional. Whether the tab should be pinned.
|
9512
|
-
* @since Chrome 9
|
9539
|
+
* @since Chrome 9
|
9513
9540
|
*/
|
9514
9541
|
pinned?: boolean | undefined;
|
9515
9542
|
/**
|
9516
9543
|
* Optional. The ID of the tab that opened this tab. If specified, the opener tab must be in the same window as this tab.
|
9517
|
-
* @since Chrome 18
|
9544
|
+
* @since Chrome 18
|
9518
9545
|
*/
|
9519
9546
|
openerTabId?: number | undefined;
|
9520
9547
|
/** Optional. A URL to navigate the tab to. */
|
9521
9548
|
url?: string | undefined;
|
9522
9549
|
/**
|
9523
9550
|
* Optional. Adds or removes the tab from the current selection.
|
9524
|
-
* @since Chrome 16
|
9551
|
+
* @since Chrome 16
|
9525
9552
|
*/
|
9526
9553
|
highlighted?: boolean | undefined;
|
9527
9554
|
/**
|
9528
9555
|
* Optional. Whether the tab should be active. Does not affect whether the window is focused (see windows.update).
|
9529
|
-
* @since Chrome 16
|
9556
|
+
* @since Chrome 16
|
9530
9557
|
*/
|
9531
9558
|
active?: boolean | undefined;
|
9532
9559
|
/**
|
@@ -9536,12 +9563,12 @@ declare namespace chrome.tabs {
|
|
9536
9563
|
selected?: boolean | undefined;
|
9537
9564
|
/**
|
9538
9565
|
* Optional. Whether the tab should be muted.
|
9539
|
-
* @since Chrome 45
|
9566
|
+
* @since Chrome 45
|
9540
9567
|
*/
|
9541
9568
|
muted?: boolean | undefined;
|
9542
9569
|
/**
|
9543
9570
|
* Optional. Whether the tab should be discarded automatically by the browser when resources are low.
|
9544
|
-
* @since Chrome 54
|
9571
|
+
* @since Chrome 54
|
9545
9572
|
*/
|
9546
9573
|
autoDiscardable?: boolean | undefined;
|
9547
9574
|
}
|
@@ -9569,12 +9596,12 @@ declare namespace chrome.tabs {
|
|
9569
9596
|
name?: string | undefined;
|
9570
9597
|
/**
|
9571
9598
|
* Open a port to a specific frame identified by frameId instead of all frames in the tab.
|
9572
|
-
* @since Chrome 41
|
9599
|
+
* @since Chrome 41
|
9573
9600
|
*/
|
9574
9601
|
frameId?: number | undefined;
|
9575
9602
|
/**
|
9576
9603
|
* Optional. Open a port to a specific document identified by documentId instead of all frames in the tab.
|
9577
|
-
* @since Chrome 106
|
9604
|
+
* @since Chrome 106
|
9578
9605
|
*/
|
9579
9606
|
documentId?: string;
|
9580
9607
|
}
|
@@ -9584,7 +9611,7 @@ declare namespace chrome.tabs {
|
|
9584
9611
|
frameId?: number | undefined;
|
9585
9612
|
/**
|
9586
9613
|
* Optional. Send a message to a specific document identified by documentId instead of all frames in the tab.
|
9587
|
-
* @since Chrome 106
|
9614
|
+
* @since Chrome 106
|
9588
9615
|
*/
|
9589
9616
|
documentId?: string;
|
9590
9617
|
}
|
@@ -9616,7 +9643,7 @@ declare namespace chrome.tabs {
|
|
9616
9643
|
status?: "loading" | "complete" | undefined;
|
9617
9644
|
/**
|
9618
9645
|
* Optional. Whether the tabs are in the last focused window.
|
9619
|
-
* @since Chrome 19
|
9646
|
+
* @since Chrome 19
|
9620
9647
|
*/
|
9621
9648
|
lastFocusedWindow?: boolean | undefined;
|
9622
9649
|
/** Optional. The ID of the parent window, or windows.WINDOW_ID_CURRENT for the current window. */
|
@@ -9630,7 +9657,7 @@ declare namespace chrome.tabs {
|
|
9630
9657
|
active?: boolean | undefined;
|
9631
9658
|
/**
|
9632
9659
|
* Optional. The position of the tabs within their windows.
|
9633
|
-
* @since Chrome 18
|
9660
|
+
* @since Chrome 18
|
9634
9661
|
*/
|
9635
9662
|
index?: number | undefined;
|
9636
9663
|
/** Optional. Match page titles against a pattern. */
|
@@ -9639,7 +9666,7 @@ declare namespace chrome.tabs {
|
|
9639
9666
|
url?: string | string[] | undefined;
|
9640
9667
|
/**
|
9641
9668
|
* Optional. Whether the tabs are in the current window.
|
9642
|
-
* @since Chrome 19
|
9669
|
+
* @since Chrome 19
|
9643
9670
|
*/
|
9644
9671
|
currentWindow?: boolean | undefined;
|
9645
9672
|
/** Optional. Whether the tabs are highlighted. */
|
@@ -9647,25 +9674,25 @@ declare namespace chrome.tabs {
|
|
9647
9674
|
/**
|
9648
9675
|
* Optional.
|
9649
9676
|
* Whether the tabs are discarded. A discarded tab is one whose content has been unloaded from memory, but is still visible in the tab strip. Its content gets reloaded the next time it's activated.
|
9650
|
-
* @since Chrome 54
|
9677
|
+
* @since Chrome 54
|
9651
9678
|
*/
|
9652
9679
|
discarded?: boolean | undefined;
|
9653
9680
|
/**
|
9654
9681
|
* Optional.
|
9655
9682
|
* Whether the tabs can be discarded automatically by the browser when resources are low.
|
9656
|
-
* @since Chrome 54
|
9683
|
+
* @since Chrome 54
|
9657
9684
|
*/
|
9658
9685
|
autoDiscardable?: boolean | undefined;
|
9659
9686
|
/** Optional. Whether the tabs are pinned. */
|
9660
9687
|
pinned?: boolean | undefined;
|
9661
9688
|
/**
|
9662
9689
|
* Optional. Whether the tabs are audible.
|
9663
|
-
* @since Chrome 45
|
9690
|
+
* @since Chrome 45
|
9664
9691
|
*/
|
9665
9692
|
audible?: boolean | undefined;
|
9666
9693
|
/**
|
9667
9694
|
* Optional. Whether the tabs are muted.
|
9668
|
-
* @since Chrome 45
|
9695
|
+
* @since Chrome 45
|
9669
9696
|
*/
|
9670
9697
|
muted?: boolean | undefined;
|
9671
9698
|
/**
|
@@ -9683,7 +9710,7 @@ declare namespace chrome.tabs {
|
|
9683
9710
|
export interface TabRemoveInfo {
|
9684
9711
|
/**
|
9685
9712
|
* The window whose tab is closed.
|
9686
|
-
* @since Chrome 25
|
9713
|
+
* @since Chrome 25
|
9687
9714
|
*/
|
9688
9715
|
windowId: number;
|
9689
9716
|
/** True when the tab is being closed because its window is being closed. */
|
@@ -9700,24 +9727,24 @@ declare namespace chrome.tabs {
|
|
9700
9727
|
status?: string | undefined;
|
9701
9728
|
/**
|
9702
9729
|
* The tab's new pinned state.
|
9703
|
-
* @since Chrome 9
|
9730
|
+
* @since Chrome 9
|
9704
9731
|
*/
|
9705
9732
|
pinned?: boolean | undefined;
|
9706
9733
|
/** Optional. The tab's URL if it has changed. */
|
9707
9734
|
url?: string | undefined;
|
9708
9735
|
/**
|
9709
9736
|
* The tab's new audible state.
|
9710
|
-
* @since Chrome 45
|
9737
|
+
* @since Chrome 45
|
9711
9738
|
*/
|
9712
9739
|
audible?: boolean | undefined;
|
9713
9740
|
/**
|
9714
9741
|
* The tab's new discarded state.
|
9715
|
-
* @since Chrome 54
|
9742
|
+
* @since Chrome 54
|
9716
9743
|
*/
|
9717
9744
|
discarded?: boolean | undefined;
|
9718
9745
|
/**
|
9719
9746
|
* The tab's new auto-discardable
|
9720
|
-
* @since Chrome 54
|
9747
|
+
* @since Chrome 54
|
9721
9748
|
*/
|
9722
9749
|
autoDiscardable?: boolean | undefined;
|
9723
9750
|
/**
|
@@ -9727,17 +9754,17 @@ declare namespace chrome.tabs {
|
|
9727
9754
|
groupId?: number | undefined;
|
9728
9755
|
/**
|
9729
9756
|
* The tab's new muted state and the reason for the change.
|
9730
|
-
* @since Chrome 46
|
9757
|
+
* @since Chrome 46
|
9731
9758
|
*/
|
9732
9759
|
mutedInfo?: MutedInfo | undefined;
|
9733
9760
|
/**
|
9734
9761
|
* The tab's new favicon URL.
|
9735
|
-
* @since Chrome 27
|
9762
|
+
* @since Chrome 27
|
9736
9763
|
*/
|
9737
9764
|
favIconUrl?: string | undefined;
|
9738
9765
|
/**
|
9739
9766
|
* The tab's new title.
|
9740
|
-
* @since Chrome 48
|
9767
|
+
* @since Chrome 48
|
9741
9768
|
*/
|
9742
9769
|
title?: string | undefined;
|
9743
9770
|
}
|
@@ -10030,49 +10057,49 @@ declare namespace chrome.tabs {
|
|
10030
10057
|
): void;
|
10031
10058
|
/**
|
10032
10059
|
* Reload a tab.
|
10033
|
-
* @since Chrome 16
|
10060
|
+
* @since Chrome 16
|
10034
10061
|
* @param tabId The ID of the tab to reload; defaults to the selected tab of the current window.
|
10035
10062
|
* @return The `reload` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
10036
10063
|
*/
|
10037
10064
|
export function reload(tabId: number, reloadProperties?: ReloadProperties): Promise<void>;
|
10038
10065
|
/**
|
10039
10066
|
* Reload a tab.
|
10040
|
-
* @since Chrome 16
|
10067
|
+
* @since Chrome 16
|
10041
10068
|
* @param tabId The ID of the tab to reload; defaults to the selected tab of the current window.
|
10042
10069
|
*/
|
10043
10070
|
export function reload(tabId: number, reloadProperties?: ReloadProperties, callback?: () => void): void;
|
10044
10071
|
/**
|
10045
10072
|
* Reload the selected tab of the current window.
|
10046
|
-
* @since Chrome 16
|
10073
|
+
* @since Chrome 16
|
10047
10074
|
* @return The `reload` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
10048
10075
|
*/
|
10049
10076
|
export function reload(reloadProperties: ReloadProperties): Promise<void>;
|
10050
10077
|
/**
|
10051
10078
|
* Reload the selected tab of the current window.
|
10052
|
-
* @since Chrome 16
|
10079
|
+
* @since Chrome 16
|
10053
10080
|
*/
|
10054
10081
|
export function reload(reloadProperties: ReloadProperties, callback: () => void): void;
|
10055
10082
|
/**
|
10056
10083
|
* Reload the selected tab of the current window.
|
10057
|
-
* @since Chrome 16
|
10084
|
+
* @since Chrome 16
|
10058
10085
|
* @return The `reload` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
10059
10086
|
*/
|
10060
10087
|
export function reload(): Promise<void>;
|
10061
10088
|
/**
|
10062
10089
|
* Reload the selected tab of the current window.
|
10063
|
-
* @since Chrome 16
|
10090
|
+
* @since Chrome 16
|
10064
10091
|
*/
|
10065
10092
|
export function reload(callback: () => void): void;
|
10066
10093
|
/**
|
10067
10094
|
* Duplicates a tab.
|
10068
|
-
* @since Chrome 23
|
10095
|
+
* @since Chrome 23
|
10069
10096
|
* @param tabId The ID of the tab which is to be duplicated.
|
10070
10097
|
* @return The `duplicate` method provides its result via callback or returned as a `Promise` (MV3 only).
|
10071
10098
|
*/
|
10072
10099
|
export function duplicate(tabId: number): Promise<Tab | undefined>;
|
10073
10100
|
/**
|
10074
10101
|
* Duplicates a tab.
|
10075
|
-
* @since Chrome 23
|
10102
|
+
* @since Chrome 23
|
10076
10103
|
* @param tabId The ID of the tab which is to be duplicated.
|
10077
10104
|
* @param callback Optional.
|
10078
10105
|
* Optional parameter tab: Details about the duplicated tab. The tabs.Tab object doesn't contain url, title and favIconUrl if the "tabs" permission has not been requested.
|
@@ -10080,7 +10107,7 @@ declare namespace chrome.tabs {
|
|
10080
10107
|
export function duplicate(tabId: number, callback: (tab?: Tab) => void): void;
|
10081
10108
|
/**
|
10082
10109
|
* 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.
|
10083
|
-
* @since Chrome 20
|
10110
|
+
* @since Chrome 20
|
10084
10111
|
*/
|
10085
10112
|
export function sendMessage<M = any, R = any>(
|
10086
10113
|
tabId: number,
|
@@ -10089,7 +10116,7 @@ declare namespace chrome.tabs {
|
|
10089
10116
|
): void;
|
10090
10117
|
/**
|
10091
10118
|
* 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.
|
10092
|
-
* @since Chrome 41
|
10119
|
+
* @since Chrome 41
|
10093
10120
|
* @param responseCallback Optional.
|
10094
10121
|
* Parameter response: The JSON response object sent by the handler of the message. 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.
|
10095
10122
|
*/
|
@@ -10154,25 +10181,25 @@ declare namespace chrome.tabs {
|
|
10154
10181
|
export function insertCSS(tabId: number, details: InjectDetails, callback: Function): void;
|
10155
10182
|
/**
|
10156
10183
|
* Highlights the given tabs.
|
10157
|
-
* @since Chrome 16
|
10184
|
+
* @since Chrome 16
|
10158
10185
|
* @return The `highlight` method provides its result via callback or returned as a `Promise` (MV3 only). Contains details about the window whose tabs were highlighted.
|
10159
10186
|
*/
|
10160
10187
|
export function highlight(highlightInfo: HighlightInfo): Promise<chrome.windows.Window>;
|
10161
10188
|
/**
|
10162
10189
|
* Highlights the given tabs.
|
10163
|
-
* @since Chrome 16
|
10190
|
+
* @since Chrome 16
|
10164
10191
|
* @param callback Optional.
|
10165
10192
|
* Parameter window: Contains details about the window whose tabs were highlighted.
|
10166
10193
|
*/
|
10167
10194
|
export function highlight(highlightInfo: HighlightInfo, callback: (window: chrome.windows.Window) => void): void;
|
10168
10195
|
/**
|
10169
10196
|
* Gets all tabs that have the specified properties, or all tabs if no properties are specified.
|
10170
|
-
* @since Chrome 16
|
10197
|
+
* @since Chrome 16
|
10171
10198
|
*/
|
10172
10199
|
export function query(queryInfo: QueryInfo, callback: (result: Tab[]) => void): void;
|
10173
10200
|
/**
|
10174
10201
|
* Gets all tabs that have the specified properties, or all tabs if no properties are specified.
|
10175
|
-
* @since Chrome 16
|
10202
|
+
* @since Chrome 16
|
10176
10203
|
* @return The `query` method provides its result via callback or returned as a `Promise` (MV3 only).
|
10177
10204
|
*/
|
10178
10205
|
export function query(queryInfo: QueryInfo): Promise<Tab[]>;
|
@@ -10202,21 +10229,21 @@ declare namespace chrome.tabs {
|
|
10202
10229
|
export function detectLanguage(tabId: number): Promise<string>;
|
10203
10230
|
/**
|
10204
10231
|
* Zooms a specified tab.
|
10205
|
-
* @since Chrome 42
|
10232
|
+
* @since Chrome 42
|
10206
10233
|
* @param zoomFactor The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab.
|
10207
10234
|
* @return The `setZoom` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
10208
10235
|
*/
|
10209
10236
|
export function setZoom(zoomFactor: number): Promise<void>;
|
10210
10237
|
/**
|
10211
10238
|
* Zooms a specified tab.
|
10212
|
-
* @since Chrome 42
|
10239
|
+
* @since Chrome 42
|
10213
10240
|
* @param zoomFactor The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab.
|
10214
10241
|
* @param callback Optional. Called after the zoom factor has been changed.
|
10215
10242
|
*/
|
10216
10243
|
export function setZoom(zoomFactor: number, callback: () => void): void;
|
10217
10244
|
/**
|
10218
10245
|
* Zooms a specified tab.
|
10219
|
-
* @since Chrome 42
|
10246
|
+
* @since Chrome 42
|
10220
10247
|
* @param tabId Optional. The ID of the tab to zoom; defaults to the active tab of the current window.
|
10221
10248
|
* @param zoomFactor The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab.
|
10222
10249
|
* @return The `setZoom` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
@@ -10224,7 +10251,7 @@ declare namespace chrome.tabs {
|
|
10224
10251
|
export function setZoom(tabId: number, zoomFactor: number): Promise<void>;
|
10225
10252
|
/**
|
10226
10253
|
* Zooms a specified tab.
|
10227
|
-
* @since Chrome 42
|
10254
|
+
* @since Chrome 42
|
10228
10255
|
* @param tabId Optional. The ID of the tab to zoom; defaults to the active tab of the current window.
|
10229
10256
|
* @param zoomFactor The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab.
|
10230
10257
|
* @param callback Optional. Called after the zoom factor has been changed.
|
@@ -10232,20 +10259,20 @@ declare namespace chrome.tabs {
|
|
10232
10259
|
export function setZoom(tabId: number, zoomFactor: number, callback: () => void): void;
|
10233
10260
|
/**
|
10234
10261
|
* Gets the current zoom factor of a specified tab.
|
10235
|
-
* @since Chrome 42
|
10262
|
+
* @since Chrome 42
|
10236
10263
|
* @param callback Called with the tab's current zoom factor after it has been fetched.
|
10237
10264
|
* Parameter zoomFactor: The tab's current zoom factor.
|
10238
10265
|
*/
|
10239
10266
|
export function getZoom(callback: (zoomFactor: number) => void): void;
|
10240
10267
|
/**
|
10241
10268
|
* Gets the current zoom factor of a specified tab.
|
10242
|
-
* @since Chrome 42
|
10269
|
+
* @since Chrome 42
|
10243
10270
|
* @return The `getZoom` method provides its result via callback or returned as a `Promise` (MV3 only). The tab's current zoom factor.
|
10244
10271
|
*/
|
10245
10272
|
export function getZoom(): Promise<number>;
|
10246
10273
|
/**
|
10247
10274
|
* Gets the current zoom factor of a specified tab.
|
10248
|
-
* @since Chrome 42
|
10275
|
+
* @since Chrome 42
|
10249
10276
|
* @param tabId Optional. The ID of the tab to get the current zoom factor from; defaults to the active tab of the current window.
|
10250
10277
|
* @param callback Called with the tab's current zoom factor after it has been fetched.
|
10251
10278
|
* Parameter zoomFactor: The tab's current zoom factor.
|
@@ -10253,28 +10280,28 @@ declare namespace chrome.tabs {
|
|
10253
10280
|
export function getZoom(tabId: number, callback: (zoomFactor: number) => void): void;
|
10254
10281
|
/**
|
10255
10282
|
* Gets the current zoom factor of a specified tab.
|
10256
|
-
* @since Chrome 42
|
10283
|
+
* @since Chrome 42
|
10257
10284
|
* @param tabId Optional. The ID of the tab to get the current zoom factor from; defaults to the active tab of the current window.
|
10258
10285
|
* @return The `getZoom` method provides its result via callback or returned as a `Promise` (MV3 only). The tab's current zoom factor.
|
10259
10286
|
*/
|
10260
10287
|
export function getZoom(tabId: number): Promise<number>;
|
10261
10288
|
/**
|
10262
10289
|
* Sets the zoom settings for a specified tab, which define how zoom changes are handled. These settings are reset to defaults upon navigating the tab.
|
10263
|
-
* @since Chrome 42
|
10290
|
+
* @since Chrome 42
|
10264
10291
|
* @param zoomSettings Defines how zoom changes are handled and at what scope.
|
10265
10292
|
* @return The `setZoomSettings` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
10266
10293
|
*/
|
10267
10294
|
export function setZoomSettings(zoomSettings: ZoomSettings): Promise<void>;
|
10268
10295
|
/**
|
10269
10296
|
* Sets the zoom settings for a specified tab, which define how zoom changes are handled. These settings are reset to defaults upon navigating the tab.
|
10270
|
-
* @since Chrome 42
|
10297
|
+
* @since Chrome 42
|
10271
10298
|
* @param zoomSettings Defines how zoom changes are handled and at what scope.
|
10272
10299
|
* @param callback Optional. Called after the zoom settings have been changed.
|
10273
10300
|
*/
|
10274
10301
|
export function setZoomSettings(zoomSettings: ZoomSettings, callback: () => void): void;
|
10275
10302
|
/**
|
10276
10303
|
* Sets the zoom settings for a specified tab, which define how zoom changes are handled. These settings are reset to defaults upon navigating the tab.
|
10277
|
-
* @since Chrome 42
|
10304
|
+
* @since Chrome 42
|
10278
10305
|
* @param tabId Optional. The ID of the tab to change the zoom settings for; defaults to the active tab of the current window.
|
10279
10306
|
* @param zoomSettings Defines how zoom changes are handled and at what scope.
|
10280
10307
|
* @return The `setZoomSettings` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
@@ -10282,7 +10309,7 @@ declare namespace chrome.tabs {
|
|
10282
10309
|
export function setZoomSettings(tabId: number, zoomSettings: ZoomSettings): Promise<void>;
|
10283
10310
|
/**
|
10284
10311
|
* Sets the zoom settings for a specified tab, which define how zoom changes are handled. These settings are reset to defaults upon navigating the tab.
|
10285
|
-
* @since Chrome 42
|
10312
|
+
* @since Chrome 42
|
10286
10313
|
* @param tabId Optional. The ID of the tab to change the zoom settings for; defaults to the active tab of the current window.
|
10287
10314
|
* @param zoomSettings Defines how zoom changes are handled and at what scope.
|
10288
10315
|
* @param callback Optional. Called after the zoom settings have been changed.
|
@@ -10290,20 +10317,20 @@ declare namespace chrome.tabs {
|
|
10290
10317
|
export function setZoomSettings(tabId: number, zoomSettings: ZoomSettings, callback: () => void): void;
|
10291
10318
|
/**
|
10292
10319
|
* Gets the current zoom settings of a specified tab.
|
10293
|
-
* @since Chrome 42
|
10320
|
+
* @since Chrome 42
|
10294
10321
|
* @param callback Called with the tab's current zoom settings.
|
10295
10322
|
* Parameter zoomSettings: The tab's current zoom settings.
|
10296
10323
|
*/
|
10297
10324
|
export function getZoomSettings(callback: (zoomSettings: ZoomSettings) => void): void;
|
10298
10325
|
/**
|
10299
10326
|
* Gets the current zoom settings of a specified tab.
|
10300
|
-
* @since Chrome 42
|
10327
|
+
* @since Chrome 42
|
10301
10328
|
* @return The `getZoomSettings` method provides its result via callback or returned as a `Promise` (MV3 only). The tab's current zoom settings.
|
10302
10329
|
*/
|
10303
10330
|
export function getZoomSettings(): Promise<ZoomSettings>;
|
10304
10331
|
/**
|
10305
10332
|
* Gets the current zoom settings of a specified tab.
|
10306
|
-
* @since Chrome 42
|
10333
|
+
* @since Chrome 42
|
10307
10334
|
* @param tabId Optional. The ID of the tab to get the current zoom settings from; defaults to the active tab of the current window.
|
10308
10335
|
* @param callback Called with the tab's current zoom settings.
|
10309
10336
|
* Parameter zoomSettings: The tab's current zoom settings.
|
@@ -10311,21 +10338,21 @@ declare namespace chrome.tabs {
|
|
10311
10338
|
export function getZoomSettings(tabId: number, callback: (zoomSettings: ZoomSettings) => void): void;
|
10312
10339
|
/**
|
10313
10340
|
* Gets the current zoom settings of a specified tab.
|
10314
|
-
* @since Chrome 42
|
10341
|
+
* @since Chrome 42
|
10315
10342
|
* @param tabId Optional. The ID of the tab to get the current zoom settings from; defaults to the active tab of the current window.
|
10316
10343
|
* @return The `getZoomSettings` method provides its result via callback or returned as a `Promise` (MV3 only). The tab's current zoom settings.
|
10317
10344
|
*/
|
10318
10345
|
export function getZoomSettings(tabId: number): Promise<ZoomSettings>;
|
10319
10346
|
/**
|
10320
10347
|
* Discards a tab from memory. Discarded tabs are still visible on the tab strip and are reloaded when activated.
|
10321
|
-
* @since Chrome 54
|
10348
|
+
* @since Chrome 54
|
10322
10349
|
* @param tabId Optional. The ID of the tab to be discarded. If specified, the tab will be discarded unless it's active or already discarded. If omitted, the browser will discard the least important tab. This can fail if no discardable tabs exist.
|
10323
10350
|
* @return The `discard` method provides its result via callback or returned as a `Promise` (MV3 only).
|
10324
10351
|
*/
|
10325
10352
|
export function discard(tabId?: number): Promise<Tab>;
|
10326
10353
|
/**
|
10327
10354
|
* Discards a tab from memory. Discarded tabs are still visible on the tab strip and are reloaded when activated.
|
10328
|
-
* @since Chrome 54
|
10355
|
+
* @since Chrome 54
|
10329
10356
|
* @param tabId Optional. The ID of the tab to be discarded. If specified, the tab will be discarded unless it's active or already discarded. If omitted, the browser will discard the least important tab. This can fail if no discardable tabs exist.
|
10330
10357
|
* @param callback Called after the operation is completed.
|
10331
10358
|
*/
|
@@ -10333,52 +10360,52 @@ declare namespace chrome.tabs {
|
|
10333
10360
|
export function discard(tabId: number, callback: (tab: Tab) => void): void;
|
10334
10361
|
/**
|
10335
10362
|
* Go forward to the next page, if one is available.
|
10336
|
-
* @since Chrome 72
|
10363
|
+
* @since Chrome 72
|
10337
10364
|
* @return The `goForward` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
10338
10365
|
*/
|
10339
10366
|
export function goForward(): Promise<void>;
|
10340
10367
|
/**
|
10341
10368
|
* Go forward to the next page, if one is available.
|
10342
|
-
* @since Chrome 72
|
10369
|
+
* @since Chrome 72
|
10343
10370
|
* @param callback Optional. Called after the operation is completed.
|
10344
10371
|
*/
|
10345
10372
|
export function goForward(callback: () => void): void;
|
10346
10373
|
/**
|
10347
10374
|
* Go forward to the next page, if one is available.
|
10348
|
-
* @since Chrome 72
|
10375
|
+
* @since Chrome 72
|
10349
10376
|
* @param tabId Optional. The ID of the tab to navigate forward; defaults to the selected tab of the current window.
|
10350
10377
|
* @return The `goForward` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
10351
10378
|
*/
|
10352
10379
|
export function goForward(tabId: number): Promise<void>;
|
10353
10380
|
/**
|
10354
10381
|
* Go forward to the next page, if one is available.
|
10355
|
-
* @since Chrome 72
|
10382
|
+
* @since Chrome 72
|
10356
10383
|
* @param tabId Optional. The ID of the tab to navigate forward; defaults to the selected tab of the current window.
|
10357
10384
|
* @param callback Optional. Called after the operation is completed.
|
10358
10385
|
*/
|
10359
10386
|
export function goForward(tabId: number, callback: () => void): void;
|
10360
10387
|
/**
|
10361
10388
|
* Go back to the previous page, if one is available.
|
10362
|
-
* @since Chrome 72
|
10389
|
+
* @since Chrome 72
|
10363
10390
|
* @return The `goBack` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
10364
10391
|
*/
|
10365
10392
|
export function goBack(): Promise<void>;
|
10366
10393
|
/**
|
10367
10394
|
* Go back to the previous page, if one is available.
|
10368
|
-
* @since Chrome 72
|
10395
|
+
* @since Chrome 72
|
10369
10396
|
* @param callback Optional. Called after the operation is completed.
|
10370
10397
|
*/
|
10371
10398
|
export function goBack(callback: () => void): void;
|
10372
10399
|
/**
|
10373
10400
|
* Go back to the previous page, if one is available.
|
10374
|
-
* @since Chrome 72
|
10401
|
+
* @since Chrome 72
|
10375
10402
|
* @param tabId Optional. The ID of the tab to navigate back; defaults to the selected tab of the current window.
|
10376
10403
|
* @return The `goBack` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
10377
10404
|
*/
|
10378
10405
|
export function goBack(tabId: number): Promise<void>;
|
10379
10406
|
/**
|
10380
10407
|
* Go back to the previous page, if one is available.
|
10381
|
-
* @since Chrome 72
|
10408
|
+
* @since Chrome 72
|
10382
10409
|
* @param tabId Optional. The ID of the tab to navigate back; defaults to the selected tab of the current window.
|
10383
10410
|
* @param callback Optional. Called after the operation is completed.
|
10384
10411
|
*/
|
@@ -10420,7 +10447,7 @@ declare namespace chrome.tabs {
|
|
10420
10447
|
export function ungroup(tabIds: number | number[], callback: () => void): void;
|
10421
10448
|
/**
|
10422
10449
|
* Fired when the highlighted or selected tabs in a window changes.
|
10423
|
-
* @since Chrome 18
|
10450
|
+
* @since Chrome 18
|
10424
10451
|
*/
|
10425
10452
|
export var onHighlighted: TabHighlightedEvent;
|
10426
10453
|
/** Fired when a tab is closed. */
|
@@ -10439,12 +10466,12 @@ declare namespace chrome.tabs {
|
|
10439
10466
|
export var onCreated: TabCreatedEvent;
|
10440
10467
|
/**
|
10441
10468
|
* Fires when the active tab in a window changes. Note that the tab's URL may not be set at the time this event fired, but you can listen to onUpdated events to be notified when a URL is set.
|
10442
|
-
* @since Chrome 18
|
10469
|
+
* @since Chrome 18
|
10443
10470
|
*/
|
10444
10471
|
export var onActivated: TabActivatedEvent;
|
10445
10472
|
/**
|
10446
10473
|
* Fired when a tab is replaced with another tab due to prerendering or instant.
|
10447
|
-
* @since Chrome 26
|
10474
|
+
* @since Chrome 26
|
10448
10475
|
*/
|
10449
10476
|
export var onReplaced: TabReplacedEvent;
|
10450
10477
|
/**
|
@@ -10464,13 +10491,13 @@ declare namespace chrome.tabs {
|
|
10464
10491
|
export var onHighlightChanged: TabHighlightedEvent;
|
10465
10492
|
/**
|
10466
10493
|
* Fired when a tab is zoomed.
|
10467
|
-
* @since Chrome 38
|
10494
|
+
* @since Chrome 38
|
10468
10495
|
*/
|
10469
10496
|
export var onZoomChange: TabZoomChangeEvent;
|
10470
10497
|
|
10471
10498
|
/**
|
10472
10499
|
* An ID which represents the absence of a browser tab.
|
10473
|
-
* @since Chrome 46
|
10500
|
+
* @since Chrome 46
|
10474
10501
|
*/
|
10475
10502
|
export var TAB_ID_NONE: -1;
|
10476
10503
|
}
|
@@ -10481,7 +10508,7 @@ declare namespace chrome.tabs {
|
|
10481
10508
|
/**
|
10482
10509
|
* Use the chrome.tabGroups API to interact with the browser's tab grouping system. You can use this API to modify and rearrange tab groups in the browser. To group and ungroup tabs, or to query what tabs are in groups, use the chrome.tabs API.
|
10483
10510
|
* Permissions: "tabGroups"
|
10484
|
-
* @since Chrome 89
|
10511
|
+
* @since Chrome 89, MV3
|
10485
10512
|
*/
|
10486
10513
|
declare namespace chrome.tabGroups {
|
10487
10514
|
/** An ID that represents the absence of a group. */
|
@@ -10614,7 +10641,7 @@ declare namespace chrome.tabGroups {
|
|
10614
10641
|
/**
|
10615
10642
|
* Use the chrome.topSites API to access the top sites that are displayed on the new tab page.
|
10616
10643
|
* Permissions: "topSites"
|
10617
|
-
* @since Chrome 19
|
10644
|
+
* @since Chrome 19
|
10618
10645
|
*/
|
10619
10646
|
declare namespace chrome.topSites {
|
10620
10647
|
/** An object encapsulating a most visited URL, such as the URLs on the new tab page. */
|
@@ -10641,7 +10668,7 @@ declare namespace chrome.topSites {
|
|
10641
10668
|
/**
|
10642
10669
|
* Use the chrome.tts API to play synthesized text-to-speech (TTS). See also the related ttsEngine API, which allows an extension to implement a speech engine.
|
10643
10670
|
* Permissions: "tts"
|
10644
|
-
* @since Chrome 14
|
10671
|
+
* @since Chrome 14
|
10645
10672
|
*/
|
10646
10673
|
declare namespace chrome.tts {
|
10647
10674
|
/** An event from the TTS engine to communicate the status of an utterance. */
|
@@ -10691,7 +10718,7 @@ declare namespace chrome.tts {
|
|
10691
10718
|
eventTypes?: string[] | undefined;
|
10692
10719
|
/**
|
10693
10720
|
* Optional. If true, the synthesis engine is a remote network resource. It may be higher latency and may incur bandwidth costs.
|
10694
|
-
* @since Chrome 33
|
10721
|
+
* @since Chrome 33
|
10695
10722
|
*/
|
10696
10723
|
remote?: boolean | undefined;
|
10697
10724
|
}
|
@@ -10758,12 +10785,12 @@ declare namespace chrome.tts {
|
|
10758
10785
|
export function speak(utterance: string, options: SpeakOptions, callback?: Function): void;
|
10759
10786
|
/**
|
10760
10787
|
* Pauses speech synthesis, potentially in the middle of an utterance. A call to resume or stop will un-pause speech.
|
10761
|
-
* @since Chrome 29
|
10788
|
+
* @since Chrome 29
|
10762
10789
|
*/
|
10763
10790
|
export function pause(): void;
|
10764
10791
|
/**
|
10765
10792
|
* If speech was paused, resumes speaking where it left off.
|
10766
|
-
* @since Chrome 29
|
10793
|
+
* @since Chrome 29
|
10767
10794
|
*/
|
10768
10795
|
export function resume(): void;
|
10769
10796
|
}
|
@@ -10774,7 +10801,7 @@ declare namespace chrome.tts {
|
|
10774
10801
|
/**
|
10775
10802
|
* Use the chrome.ttsEngine API to implement a text-to-speech(TTS) engine using an extension. If your extension registers using this API, it will receive events containing an utterance to be spoken and other parameters when any extension or Chrome App uses the tts API to generate speech. Your extension can then use any available web technology to synthesize and output the speech, and send events back to the calling function to report the status.
|
10776
10803
|
* Permissions: "ttsEngine"
|
10777
|
-
* @since Chrome 14
|
10804
|
+
* @since Chrome 14
|
10778
10805
|
*/
|
10779
10806
|
declare namespace chrome.ttsEngine {
|
10780
10807
|
export interface SpeakOptions {
|
@@ -10810,12 +10837,12 @@ declare namespace chrome.ttsEngine {
|
|
10810
10837
|
export var onStop: chrome.events.Event<() => void>;
|
10811
10838
|
/**
|
10812
10839
|
* Optional: if an engine supports the pause event, it should pause the current utterance being spoken, if any, until it receives a resume event or stop event. Note that a stop event should also clear the paused state.
|
10813
|
-
* @since Chrome 29
|
10840
|
+
* @since Chrome 29
|
10814
10841
|
*/
|
10815
10842
|
export var onPause: chrome.events.Event<() => void>;
|
10816
10843
|
/**
|
10817
10844
|
* Optional: if an engine supports the pause event, it should also support the resume event, to continue speaking the current utterance, if any. Note that a stop event should also clear the paused state.
|
10818
|
-
* @since Chrome 29
|
10845
|
+
* @since Chrome 29
|
10819
10846
|
*/
|
10820
10847
|
export var onResume: chrome.events.Event<() => void>;
|
10821
10848
|
}
|
@@ -10825,7 +10852,7 @@ declare namespace chrome.ttsEngine {
|
|
10825
10852
|
////////////////////
|
10826
10853
|
/**
|
10827
10854
|
* The chrome.types API contains type declarations for Chrome.
|
10828
|
-
* @since Chrome 13
|
10855
|
+
* @since Chrome 13
|
10829
10856
|
*/
|
10830
10857
|
declare namespace chrome.types {
|
10831
10858
|
type settingsScope = "regular" | "regular_only" | "incognito_persistent" | "incognito_session_only" | undefined;
|
@@ -10925,7 +10952,7 @@ declare namespace chrome.types {
|
|
10925
10952
|
* Use the chrome.vpnProvider API to implement a VPN client.
|
10926
10953
|
* Permissions: "vpnProvider"
|
10927
10954
|
* Important: This API works only on Chrome OS.
|
10928
|
-
* @since Chrome 43
|
10955
|
+
* @since Chrome 43
|
10929
10956
|
*/
|
10930
10957
|
declare namespace chrome.vpnProvider {
|
10931
10958
|
export interface VpnSessionParameters {
|
@@ -11016,7 +11043,7 @@ declare namespace chrome.vpnProvider {
|
|
11016
11043
|
* Use the chrome.wallpaper API to change the ChromeOS wallpaper.
|
11017
11044
|
* Permissions: "wallpaper"
|
11018
11045
|
* Important: This API works only on Chrome OS.
|
11019
|
-
* @since Chrome 43
|
11046
|
+
* @since Chrome 43
|
11020
11047
|
*/
|
11021
11048
|
declare namespace chrome.wallpaper {
|
11022
11049
|
export interface WallpaperDetails {
|
@@ -11049,13 +11076,13 @@ declare namespace chrome.wallpaper {
|
|
11049
11076
|
/**
|
11050
11077
|
* Use the chrome.webNavigation API to receive notifications about the status of navigation requests in-flight.
|
11051
11078
|
* Permissions: "webNavigation"
|
11052
|
-
* @since Chrome 16
|
11079
|
+
* @since Chrome 16
|
11053
11080
|
*/
|
11054
11081
|
declare namespace chrome.webNavigation {
|
11055
11082
|
export interface GetFrameDetails {
|
11056
11083
|
/**
|
11057
11084
|
* The ID of the process runs the renderer for this tab.
|
11058
|
-
* @since Chrome 22
|
11085
|
+
* @since Chrome 22
|
11059
11086
|
* @deprecated since Chrome 49. Frames are now uniquely identified by their tab ID and frame ID; the process ID is no longer needed and therefore ignored.
|
11060
11087
|
*/
|
11061
11088
|
processId?: number | undefined;
|
@@ -11123,7 +11150,7 @@ declare namespace chrome.webNavigation {
|
|
11123
11150
|
parentDocumentId?: string | undefined;
|
11124
11151
|
/**
|
11125
11152
|
* The ID of the process runs the renderer for this tab.
|
11126
|
-
* @since Chrome 22
|
11153
|
+
* @since Chrome 22
|
11127
11154
|
*/
|
11128
11155
|
processId: number;
|
11129
11156
|
}
|
@@ -11138,7 +11165,7 @@ declare namespace chrome.webNavigation {
|
|
11138
11165
|
sourceTabId: number;
|
11139
11166
|
/**
|
11140
11167
|
* The ID of the process runs the renderer for the source tab.
|
11141
|
-
* @since Chrome 22
|
11168
|
+
* @since Chrome 22
|
11142
11169
|
*/
|
11143
11170
|
sourceProcessId: number;
|
11144
11171
|
/** The ID of the frame with sourceTabId in which the navigation is triggered. 0 indicates the main frame. */
|
@@ -11148,7 +11175,7 @@ declare namespace chrome.webNavigation {
|
|
11148
11175
|
export interface WebNavigationParentedCallbackDetails extends WebNavigationFramedCallbackDetails {
|
11149
11176
|
/**
|
11150
11177
|
* ID of frame that wraps the frame. Set to -1 of no parent frame exists.
|
11151
|
-
* @since Chrome 24
|
11178
|
+
* @since Chrome 24
|
11152
11179
|
*/
|
11153
11180
|
parentFrameId: number;
|
11154
11181
|
}
|
@@ -11233,14 +11260,14 @@ declare namespace chrome.webNavigation {
|
|
11233
11260
|
export var onCompleted: WebNavigationFramedEvent;
|
11234
11261
|
/**
|
11235
11262
|
* Fired when the frame's history was updated to a new URL. All future events for that frame will use the updated URL.
|
11236
|
-
* @since Chrome 22
|
11263
|
+
* @since Chrome 22
|
11237
11264
|
*/
|
11238
11265
|
export var onHistoryStateUpdated: WebNavigationTransitionalEvent;
|
11239
11266
|
/** Fired when a new window, or a new tab in an existing window, is created to host a navigation. */
|
11240
11267
|
export var onCreatedNavigationTarget: WebNavigationSourceEvent;
|
11241
11268
|
/**
|
11242
11269
|
* Fired when the contents of the tab is replaced by a different (usually previously pre-rendered) tab.
|
11243
|
-
* @since Chrome 22
|
11270
|
+
* @since Chrome 22
|
11244
11271
|
*/
|
11245
11272
|
export var onTabReplaced: WebNavigationReplacementEvent;
|
11246
11273
|
/** Fired when a navigation is about to occur. */
|
@@ -11259,7 +11286,7 @@ declare namespace chrome.webNavigation {
|
|
11259
11286
|
/**
|
11260
11287
|
* Use the chrome.webRequest API to observe and analyze traffic and to intercept, block, or modify requests in-flight.
|
11261
11288
|
* Permissions: "webRequest", host permissions
|
11262
|
-
* @since Chrome 17
|
11289
|
+
* @since Chrome 17
|
11263
11290
|
*/
|
11264
11291
|
declare namespace chrome.webRequest {
|
11265
11292
|
/** How the requested resource will be used. */
|
@@ -11330,7 +11357,7 @@ declare namespace chrome.webRequest {
|
|
11330
11357
|
|
11331
11358
|
/**
|
11332
11359
|
* Contains data uploaded in a URL request.
|
11333
|
-
* @since Chrome 23
|
11360
|
+
* @since Chrome 23
|
11334
11361
|
*/
|
11335
11362
|
export interface UploadData {
|
11336
11363
|
/** Optional. An ArrayBuffer with a copy of the data. */
|
@@ -11376,7 +11403,7 @@ declare namespace chrome.webRequest {
|
|
11376
11403
|
/** The time when this signal is triggered, in milliseconds since the epoch. */
|
11377
11404
|
timeStamp: number;
|
11378
11405
|
/** The origin where the request was initiated. This does not change through redirects. If this is an opaque origin, the string 'null' will be used.
|
11379
|
-
* @since
|
11406
|
+
* @since Chrome 63
|
11380
11407
|
*/
|
11381
11408
|
initiator?: string | undefined;
|
11382
11409
|
}
|
@@ -11406,7 +11433,7 @@ declare namespace chrome.webRequest {
|
|
11406
11433
|
export interface WebRequestBodyDetails extends WebRequestDetails {
|
11407
11434
|
/**
|
11408
11435
|
* Contains the HTTP request body data. Only provided if extraInfoSpec contains 'requestBody'.
|
11409
|
-
* @since Chrome 23
|
11436
|
+
* @since Chrome 23
|
11410
11437
|
*/
|
11411
11438
|
requestBody: WebRequestBody | null;
|
11412
11439
|
}
|
@@ -11418,7 +11445,7 @@ declare namespace chrome.webRequest {
|
|
11418
11445
|
statusLine: string;
|
11419
11446
|
/**
|
11420
11447
|
* Standard HTTP status code returned by the server.
|
11421
|
-
* @since Chrome 43
|
11448
|
+
* @since Chrome 43
|
11422
11449
|
*/
|
11423
11450
|
statusCode: number;
|
11424
11451
|
}
|
@@ -11541,7 +11568,7 @@ declare namespace chrome.webRequest {
|
|
11541
11568
|
|
11542
11569
|
/**
|
11543
11570
|
* 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.
|
11544
|
-
* @since Chrome 23
|
11571
|
+
* @since Chrome 23
|
11545
11572
|
*/
|
11546
11573
|
export var MAX_HANDLER_BEHAVIOR_CHANGED_CALLS_PER_10_MINUTES: number;
|
11547
11574
|
|
@@ -11573,7 +11600,7 @@ declare namespace chrome.webRequest {
|
|
11573
11600
|
////////////////////
|
11574
11601
|
/**
|
11575
11602
|
* Use the chrome.webstore API to initiate app and extension installations "inline" from your site.
|
11576
|
-
* @since Chrome 15
|
11603
|
+
* @since Chrome 15
|
11577
11604
|
*/
|
11578
11605
|
declare namespace chrome.webstore {
|
11579
11606
|
/**
|
@@ -11665,12 +11692,12 @@ declare namespace chrome.webstore {
|
|
11665
11692
|
|
11666
11693
|
/**
|
11667
11694
|
* 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.
|
11668
|
-
* @since Chrome 35
|
11695
|
+
* @since Chrome 35
|
11669
11696
|
*/
|
11670
11697
|
export var onInstallStageChanged: InstallationStageEvent;
|
11671
11698
|
/**
|
11672
11699
|
* Fired periodically with the download progress of an inline install. In order to receive notifications about this event, listeners must be registered before the inline installation begins.
|
11673
|
-
* @since Chrome 35
|
11700
|
+
* @since Chrome 35
|
11674
11701
|
*/
|
11675
11702
|
export var onDownloadProgress: DownloadProgressEvent;
|
11676
11703
|
}
|
@@ -11681,7 +11708,7 @@ declare namespace chrome.webstore {
|
|
11681
11708
|
/**
|
11682
11709
|
* Use the chrome.windows API to interact with browser windows. You can use this API to create, modify, and rearrange windows in the browser.
|
11683
11710
|
* Permissions: The chrome.windows API can be used without declaring any permission. However, the "tabs" permission is required in order to populate the url, title, and favIconUrl properties of Tab objects.
|
11684
|
-
* @since Chrome 5
|
11711
|
+
* @since Chrome 5
|
11685
11712
|
*/
|
11686
11713
|
declare namespace chrome.windows {
|
11687
11714
|
export interface Window {
|
@@ -11695,14 +11722,14 @@ declare namespace chrome.windows {
|
|
11695
11722
|
width?: number | undefined;
|
11696
11723
|
/**
|
11697
11724
|
* The state of this browser window.
|
11698
|
-
* @since Chrome 17
|
11725
|
+
* @since Chrome 17
|
11699
11726
|
*/
|
11700
11727
|
state?: windowStateEnum | undefined;
|
11701
11728
|
/** Whether the window is currently the focused window. */
|
11702
11729
|
focused: boolean;
|
11703
11730
|
/**
|
11704
11731
|
* Whether the window is set to be always on top.
|
11705
|
-
* @since Chrome 19
|
11732
|
+
* @since Chrome 19
|
11706
11733
|
*/
|
11707
11734
|
alwaysOnTop: boolean;
|
11708
11735
|
/** Whether the window is incognito. */
|
@@ -11717,7 +11744,7 @@ declare namespace chrome.windows {
|
|
11717
11744
|
left?: number | undefined;
|
11718
11745
|
/**
|
11719
11746
|
* Optional. The session ID used to uniquely identify a Window obtained from the sessions API.
|
11720
|
-
* @since Chrome 31
|
11747
|
+
* @since Chrome 31
|
11721
11748
|
*/
|
11722
11749
|
sessionId?: string | undefined;
|
11723
11750
|
}
|
@@ -11738,7 +11765,7 @@ declare namespace chrome.windows {
|
|
11738
11765
|
export interface CreateData {
|
11739
11766
|
/**
|
11740
11767
|
* Optional. The id of the tab for which you want to adopt to the new window.
|
11741
|
-
* @since Chrome 10
|
11768
|
+
* @since Chrome 10
|
11742
11769
|
*/
|
11743
11770
|
tabId?: number | undefined;
|
11744
11771
|
/**
|
@@ -11763,7 +11790,7 @@ declare namespace chrome.windows {
|
|
11763
11790
|
width?: number | undefined;
|
11764
11791
|
/**
|
11765
11792
|
* Optional. If true, opens an active window. If false, opens an inactive window.
|
11766
|
-
* @since Chrome 12
|
11793
|
+
* @since Chrome 12
|
11767
11794
|
*/
|
11768
11795
|
focused?: boolean | undefined;
|
11769
11796
|
/** Optional. Whether the new window should be an incognito window. */
|
@@ -11777,12 +11804,12 @@ declare namespace chrome.windows {
|
|
11777
11804
|
left?: number | undefined;
|
11778
11805
|
/**
|
11779
11806
|
* Optional. The initial state of the window. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'.
|
11780
|
-
* @since Chrome 44
|
11807
|
+
* @since Chrome 44
|
11781
11808
|
*/
|
11782
11809
|
state?: windowStateEnum | undefined;
|
11783
11810
|
/**
|
11784
11811
|
* If true, the newly-created window's 'window.opener' is set to the caller and is in the same [unit of related browsing contexts](https://www.w3.org/TR/html51/browsers.html#unit-of-related-browsing-contexts) as the caller.
|
11785
|
-
* @since Chrome 64
|
11812
|
+
* @since Chrome 64
|
11786
11813
|
*/
|
11787
11814
|
setSelfAsOpener?: boolean | undefined;
|
11788
11815
|
}
|
@@ -11792,7 +11819,7 @@ declare namespace chrome.windows {
|
|
11792
11819
|
top?: number | undefined;
|
11793
11820
|
/**
|
11794
11821
|
* Optional. If true, causes the window to be displayed in a manner that draws the user's attention to the window, without changing the focused window. The effect lasts until the user changes focus to the window. This option has no effect if the window already has focus. Set to false to cancel a previous draw attention request.
|
11795
|
-
* @since Chrome 14
|
11822
|
+
* @since Chrome 14
|
11796
11823
|
*/
|
11797
11824
|
drawAttention?: boolean | undefined;
|
11798
11825
|
/** Optional. The height to resize the window to in pixels. This value is ignored for panels. */
|
@@ -11801,12 +11828,12 @@ declare namespace chrome.windows {
|
|
11801
11828
|
width?: number | undefined;
|
11802
11829
|
/**
|
11803
11830
|
* Optional. The new state of the window. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'.
|
11804
|
-
* @since Chrome 17
|
11831
|
+
* @since Chrome 17
|
11805
11832
|
*/
|
11806
11833
|
state?: windowStateEnum | undefined;
|
11807
11834
|
/**
|
11808
11835
|
* Optional. If true, brings the window to the front. If false, brings the next window in the z-order to the front.
|
11809
|
-
* @since Chrome 8
|
11836
|
+
* @since Chrome 8
|
11810
11837
|
*/
|
11811
11838
|
focused?: boolean | undefined;
|
11812
11839
|
/** Optional. The offset from the left edge of the screen to move the window to in pixels. This value is ignored for panels. */
|
@@ -11837,32 +11864,32 @@ declare namespace chrome.windows {
|
|
11837
11864
|
/**
|
11838
11865
|
* Specifies what type of browser window to create.
|
11839
11866
|
* 'panel' is deprecated and is available only to existing whitelisted extensions on Chrome OS.
|
11840
|
-
* @since Chrome 44
|
11867
|
+
* @since Chrome 44
|
11841
11868
|
*/
|
11842
11869
|
export type createTypeEnum = "normal" | "popup" | "panel";
|
11843
11870
|
|
11844
11871
|
/**
|
11845
11872
|
* The state of this browser window.
|
11846
11873
|
* In some circumstances a window may not be assigned a state property; for example, when querying closed windows from the sessions API.
|
11847
|
-
* @since Chrome 44
|
11874
|
+
* @since Chrome 44
|
11848
11875
|
*/
|
11849
11876
|
export type windowStateEnum = "normal" | "minimized" | "maximized" | "fullscreen" | "locked-fullscreen";
|
11850
11877
|
|
11851
11878
|
/**
|
11852
11879
|
* The type of browser window this is.
|
11853
11880
|
* In some circumstances a window may not be assigned a type property; for example, when querying closed windows from the sessions API.
|
11854
|
-
* @since Chrome 44
|
11881
|
+
* @since Chrome 44
|
11855
11882
|
*/
|
11856
11883
|
export type windowTypeEnum = "normal" | "popup" | "panel" | "app" | "devtools";
|
11857
11884
|
|
11858
11885
|
/**
|
11859
11886
|
* The windowId value that represents the current window.
|
11860
|
-
* @since Chrome 18
|
11887
|
+
* @since Chrome 18
|
11861
11888
|
*/
|
11862
11889
|
export var WINDOW_ID_CURRENT: -2;
|
11863
11890
|
/**
|
11864
11891
|
* The windowId value that represents the absence of a chrome browser window.
|
11865
|
-
* @since Chrome 6
|
11892
|
+
* @since Chrome 6
|
11866
11893
|
*/
|
11867
11894
|
export var WINDOW_ID_NONE: -1;
|
11868
11895
|
|
@@ -11875,7 +11902,7 @@ declare namespace chrome.windows {
|
|
11875
11902
|
export function get(windowId: number): Promise<chrome.windows.Window>;
|
11876
11903
|
/**
|
11877
11904
|
* Gets details about a window.
|
11878
|
-
* @since Chrome 18
|
11905
|
+
* @since Chrome 18
|
11879
11906
|
*/
|
11880
11907
|
export function get(
|
11881
11908
|
windowId: number,
|
@@ -11884,7 +11911,7 @@ declare namespace chrome.windows {
|
|
11884
11911
|
): void;
|
11885
11912
|
/**
|
11886
11913
|
* Gets details about a window.
|
11887
|
-
* @since Chrome 18
|
11914
|
+
* @since Chrome 18
|
11888
11915
|
* @return The `get` method provides its result via callback or returned as a `Promise` (MV3 only).
|
11889
11916
|
*/
|
11890
11917
|
export function get(windowId: number, queryOptions: QueryOptions): Promise<chrome.windows.Window>;
|
@@ -11898,13 +11925,13 @@ declare namespace chrome.windows {
|
|
11898
11925
|
/**
|
11899
11926
|
* Gets the current window.
|
11900
11927
|
* @param QueryOptions
|
11901
|
-
* @since Chrome 18
|
11928
|
+
* @since Chrome 18
|
11902
11929
|
*/
|
11903
11930
|
export function getCurrent(queryOptions: QueryOptions, callback: (window: chrome.windows.Window) => void): void;
|
11904
11931
|
/**
|
11905
11932
|
* Gets the current window.
|
11906
11933
|
* @param QueryOptions
|
11907
|
-
* @since Chrome 18
|
11934
|
+
* @since Chrome 18
|
11908
11935
|
* @return The `getCurrent` method provides its result via callback or returned as a `Promise` (MV3 only).
|
11909
11936
|
*/
|
11910
11937
|
export function getCurrent(queryOptions: QueryOptions): Promise<chrome.windows.Window>;
|
@@ -11943,12 +11970,12 @@ declare namespace chrome.windows {
|
|
11943
11970
|
export function getAll(): Promise<chrome.windows.Window[]>;
|
11944
11971
|
/**
|
11945
11972
|
* Gets all windows.
|
11946
|
-
* @since Chrome 18
|
11973
|
+
* @since Chrome 18
|
11947
11974
|
*/
|
11948
11975
|
export function getAll(queryOptions: QueryOptions, callback: (windows: chrome.windows.Window[]) => void): void;
|
11949
11976
|
/**
|
11950
11977
|
* Gets all windows.
|
11951
|
-
* @since Chrome 18
|
11978
|
+
* @since Chrome 18
|
11952
11979
|
* @return The `getAll` method provides its result via callback or returned as a `Promise` (MV3 only).
|
11953
11980
|
*/
|
11954
11981
|
export function getAll(queryOptions: QueryOptions): Promise<chrome.windows.Window[]>;
|
@@ -11984,12 +12011,12 @@ declare namespace chrome.windows {
|
|
11984
12011
|
export function getLastFocused(): Promise<chrome.windows.Window>;
|
11985
12012
|
/**
|
11986
12013
|
* Gets the window that was most recently focused — typically the window 'on top'.
|
11987
|
-
* @since Chrome 18
|
12014
|
+
* @since Chrome 18
|
11988
12015
|
*/
|
11989
12016
|
export function getLastFocused(queryOptions: QueryOptions, callback: (window: chrome.windows.Window) => void): void;
|
11990
12017
|
/**
|
11991
12018
|
* Gets the window that was most recently focused — typically the window 'on top'.
|
11992
|
-
* @since Chrome 18
|
12019
|
+
* @since Chrome 18
|
11993
12020
|
* @return The `getLastFocused` method provides its result via callback or returned as a `Promise` (MV3 only).
|
11994
12021
|
*/
|
11995
12022
|
export function getLastFocused(queryOptions: QueryOptions): Promise<chrome.windows.Window>;
|
@@ -12006,7 +12033,7 @@ declare namespace chrome.windows {
|
|
12006
12033
|
|
12007
12034
|
/**
|
12008
12035
|
* Fired when a window has been resized; this event is only dispatched when the new bounds are committed, and not for in-progress changes.
|
12009
|
-
* @since Chrome 86
|
12036
|
+
* @since Chrome 86
|
12010
12037
|
*/
|
12011
12038
|
export var onBoundsChanged: WindowReferenceEvent;
|
12012
12039
|
}
|
@@ -12291,7 +12318,7 @@ declare namespace chrome.declarativeNetRequest {
|
|
12291
12318
|
|
12292
12319
|
/**
|
12293
12320
|
* Whether the urlFilter or regexFilter (whichever is specified) is case sensitive.
|
12294
|
-
*
|
12321
|
+
* @default false Before Chrome 118 the default was true.
|
12295
12322
|
*/
|
12296
12323
|
isUrlFilterCaseSensitive?: boolean | undefined;
|
12297
12324
|
|
@@ -12779,8 +12806,8 @@ declare namespace chrome.declarativeNetRequest {
|
|
12779
12806
|
// SidePanel
|
12780
12807
|
////////////////////
|
12781
12808
|
/**
|
12782
|
-
*
|
12783
|
-
* https://developer.chrome.com/docs/extensions/reference/sidePanel
|
12809
|
+
* @since Chrome 114, MV3
|
12810
|
+
* https://developer.chrome.com/docs/extensions/reference/api/sidePanel
|
12784
12811
|
* Permissions: "sidePanel"
|
12785
12812
|
*/
|
12786
12813
|
declare namespace chrome.sidePanel {
|