@types/chrome 0.0.288 → 0.0.290
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- chrome/README.md +1 -1
- chrome/index.d.ts +140 -84
- chrome/package.json +2 -2
chrome/README.md
CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for chrome (http://developer.chrome.com/e
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated:
|
11
|
+
* Last updated: Mon, 06 Jan 2025 08:02:47 GMT
|
12
12
|
* Dependencies: [@types/filesystem](https://npmjs.com/package/@types/filesystem), [@types/har-format](https://npmjs.com/package/@types/har-format)
|
13
13
|
|
14
14
|
# Credits
|
chrome/index.d.ts
CHANGED
@@ -14,60 +14,125 @@ declare namespace chrome {
|
|
14
14
|
// Accessibility Features
|
15
15
|
////////////////////
|
16
16
|
/**
|
17
|
-
* 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.
|
18
|
-
*
|
19
|
-
* Permissions: "accessibilityFeatures.read"
|
20
|
-
* Important: This API works only on Chrome OS.
|
17
|
+
* 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.
|
18
|
+
* Permissions: "accessibilityFeatures.read", "accessibilityFeatures.modify"
|
21
19
|
*/
|
22
20
|
export namespace accessibilityFeatures {
|
23
|
-
/**
|
24
|
-
export
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
/**
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
/**
|
38
|
-
* **ChromeOS only.**
|
39
|
-
* Caret highlighting.
|
21
|
+
/** `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission. */
|
22
|
+
export const animationPolicy: chrome.types.ChromeSetting<"allowed" | "once" | "none">;
|
23
|
+
|
24
|
+
/**
|
25
|
+
* Auto mouse click after mouse stops moving. The value indicates whether the feature is enabled or not.
|
26
|
+
* `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
|
27
|
+
* @platform ChromeOS only
|
28
|
+
*/
|
29
|
+
export const autoclick: chrome.types.ChromeSetting<boolean>;
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Caret highlighting. The value indicates whether the feature is enabled or not.
|
33
|
+
* `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
|
34
|
+
* @platform ChromeOS only
|
40
35
|
* @since Chrome 51
|
41
36
|
*/
|
42
|
-
export
|
37
|
+
export const caretHighlight: chrome.types.ChromeSetting<boolean>;
|
38
|
+
|
43
39
|
/**
|
44
|
-
*
|
45
|
-
*
|
40
|
+
* Cursor color. The value indicates whether the feature is enabled or not, doesn't indicate the color of it.
|
41
|
+
* `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
|
42
|
+
* @platform ChromeOS only
|
43
|
+
* @since Chrome 85
|
44
|
+
*/
|
45
|
+
export const cursorColor: chrome.types.ChromeSetting<boolean>;
|
46
|
+
|
47
|
+
/**
|
48
|
+
* Cursor highlighting. The value indicates whether the feature is enabled or not.
|
49
|
+
* `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
|
50
|
+
* @platform ChromeOS only
|
46
51
|
* @since Chrome 51
|
47
52
|
*/
|
48
|
-
export
|
53
|
+
export const cursorHighlight: chrome.types.ChromeSetting<boolean>;
|
54
|
+
|
55
|
+
/**
|
56
|
+
* Dictation. The value indicates whether the feature is enabled or not.
|
57
|
+
* `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
|
58
|
+
* @platform ChromeOS only
|
59
|
+
* @since Chrome 90
|
60
|
+
*/
|
61
|
+
export const dictation: chrome.types.ChromeSetting<boolean>;
|
62
|
+
|
63
|
+
/**
|
64
|
+
* Docked magnifier. The value indicates whether docked magnifier feature is enabled or not.
|
65
|
+
* `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
|
66
|
+
* @platform ChromeOS only
|
67
|
+
* @since Chrome 87
|
68
|
+
*/
|
69
|
+
export const dockedMagnifier: chrome.types.ChromeSetting<boolean>;
|
70
|
+
|
49
71
|
/**
|
50
|
-
*
|
51
|
-
*
|
72
|
+
* Focus highlighting. The value indicates whether the feature is enabled or not.
|
73
|
+
* `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
|
74
|
+
* @platform ChromeOS only
|
52
75
|
* @since Chrome 51
|
53
76
|
*/
|
54
|
-
export
|
77
|
+
export const focusHighlight: chrome.types.ChromeSetting<boolean>;
|
78
|
+
|
55
79
|
/**
|
56
|
-
*
|
57
|
-
*
|
80
|
+
* High contrast rendering mode. The value indicates whether the feature is enabled or not.
|
81
|
+
* `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
|
82
|
+
* @platform ChromeOS only
|
83
|
+
*/
|
84
|
+
export const highContrast: chrome.types.ChromeSetting<boolean>;
|
85
|
+
|
86
|
+
/**
|
87
|
+
* Enlarged cursor. The value indicates whether the feature is enabled or not.
|
88
|
+
* `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
|
89
|
+
* @platform ChromeOS only
|
90
|
+
*/
|
91
|
+
export const largeCursor: chrome.types.ChromeSetting<boolean>;
|
92
|
+
|
93
|
+
/**
|
94
|
+
* Full screen magnification. The value indicates whether the feature is enabled or not.
|
95
|
+
* `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
|
96
|
+
* @platform ChromeOS only
|
97
|
+
*/
|
98
|
+
export const screenMagnifier: chrome.types.ChromeSetting<boolean>;
|
99
|
+
|
100
|
+
/**
|
101
|
+
* Select-to-speak. The value indicates whether the feature is enabled or not.
|
102
|
+
* `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
|
103
|
+
* @platform ChromeOS only
|
58
104
|
* @since Chrome 51
|
59
105
|
*/
|
60
|
-
export
|
106
|
+
export const selectToSpeak: chrome.types.ChromeSetting<boolean>;
|
107
|
+
|
108
|
+
/**
|
109
|
+
* Spoken feedback (text-to-speech). The value indicates whether the feature is enabled or not.
|
110
|
+
* `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
|
111
|
+
* @platform ChromeOS only
|
112
|
+
*/
|
113
|
+
export const spokenFeedback: chrome.types.ChromeSetting<boolean>;
|
114
|
+
|
61
115
|
/**
|
62
|
-
*
|
63
|
-
*
|
116
|
+
* Sticky modifier keys (like shift or alt). The value indicates whether the feature is enabled or not.
|
117
|
+
* `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
|
118
|
+
* @platform ChromeOS only
|
119
|
+
*/
|
120
|
+
export const stickyKeys: chrome.types.ChromeSetting<boolean>;
|
121
|
+
|
122
|
+
/**
|
123
|
+
* Switch Access. The value indicates whether the feature is enabled or not.
|
124
|
+
* `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
|
125
|
+
* @platform ChromeOS only
|
64
126
|
* @since Chrome 51
|
65
127
|
*/
|
66
|
-
export
|
128
|
+
export const switchAccess: chrome.types.ChromeSetting<boolean>;
|
129
|
+
|
67
130
|
/**
|
68
|
-
*
|
131
|
+
* Virtual on-screen keyboard. The value indicates whether the feature is enabled or not.
|
132
|
+
* `get()` requires `accessibilityFeatures.read` permission. `set()` and `clear()` require `accessibilityFeatures.modify` permission.
|
133
|
+
* @platform ChromeOS only
|
69
134
|
*/
|
70
|
-
export
|
135
|
+
export const virtualKeyboard: chrome.types.ChromeSetting<boolean>;
|
71
136
|
}
|
72
137
|
|
73
138
|
////////////////////
|
@@ -112,8 +177,6 @@ declare namespace chrome {
|
|
112
177
|
popup: string;
|
113
178
|
}
|
114
179
|
|
115
|
-
export interface BrowserClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {}
|
116
|
-
|
117
180
|
export interface TabIconDetails {
|
118
181
|
/** Optional. Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals scale, then image with size scale * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}' */
|
119
182
|
path?: string | { [index: number]: string } | undefined;
|
@@ -133,11 +196,21 @@ declare namespace chrome {
|
|
133
196
|
tabId?: number | undefined;
|
134
197
|
}
|
135
198
|
|
199
|
+
/**
|
200
|
+
* The collection of user-specified settings relating to an extension's action.
|
201
|
+
* @since Chrome 91
|
202
|
+
*/
|
136
203
|
export interface UserSettings {
|
137
204
|
/** Whether the extension's action icon is visible on browser windows' top-level toolbar (i.e., whether the extension has been 'pinned' by the user). */
|
138
205
|
isOnToolbar: boolean;
|
139
206
|
}
|
140
207
|
|
208
|
+
/** @since Chrome 130 */
|
209
|
+
export interface UserSettingsChange {
|
210
|
+
/** Whether the extension's action icon is visible on browser windows' top-level toolbar (i.e., whether the extension has been 'pinned' by the user). */
|
211
|
+
isOnToolbar?: boolean;
|
212
|
+
}
|
213
|
+
|
141
214
|
/**
|
142
215
|
* @since Chrome 88
|
143
216
|
* Disables the action for a tab.
|
@@ -358,7 +431,13 @@ declare namespace chrome {
|
|
358
431
|
export function setTitle(details: TitleDetails, callback: () => void): void;
|
359
432
|
|
360
433
|
/** Fired when an action icon is clicked. This event will not fire if the action has a popup. */
|
361
|
-
export
|
434
|
+
export const onClicked: chrome.events.Event<(tab: chrome.tabs.Tab) => void>;
|
435
|
+
|
436
|
+
/**
|
437
|
+
* Fired when user-specified settings relating to an extension's action change.
|
438
|
+
* @since Chrome 130
|
439
|
+
*/
|
440
|
+
export const onUserSettingsChanged: chrome.events.Event<(change: UserSettingsChange) => void>;
|
362
441
|
}
|
363
442
|
|
364
443
|
////////////////////
|
@@ -6678,72 +6757,49 @@ declare namespace chrome {
|
|
6678
6757
|
*/
|
6679
6758
|
export namespace permissions {
|
6680
6759
|
export interface Permissions {
|
6681
|
-
/**
|
6682
|
-
|
6683
|
-
|
6684
|
-
|
6685
|
-
permissions?: string[] | undefined;
|
6686
|
-
/**
|
6687
|
-
* Optional.
|
6688
|
-
* List of origin permissions. Anything listed here must be a subset of a host that appears in the optional host permission list in the manifest (optional_permissions in MV2, optional_host_permissions in MV3). For example, if http://*.example.com/ or http://* appears in the optional permissions, you can request an origin of http://help.example.com/. Any path is ignored.
|
6689
|
-
*/
|
6690
|
-
origins?: string[] | undefined;
|
6691
|
-
}
|
6692
|
-
|
6693
|
-
export interface PermissionsRemovedEvent {
|
6694
|
-
addListener(
|
6695
|
-
callback: (/** The permissions that have been removed*/ permissions: Permissions) => void,
|
6696
|
-
): void;
|
6697
|
-
}
|
6698
|
-
|
6699
|
-
export interface PermissionsAddedEvent {
|
6700
|
-
addListener(callback: (/** The newly-acquired permissions*/ permissions: Permissions) => void): void;
|
6760
|
+
/** The list of host permissions, including those specified in the `optional_permissions` or `permissions` keys in the manifest, and those associated with [Content Scripts](https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts). */
|
6761
|
+
origins?: string[];
|
6762
|
+
/** List of named permissions (does not include hosts or origins). */
|
6763
|
+
permissions?: chrome.runtime.ManifestPermissions[];
|
6701
6764
|
}
|
6702
6765
|
|
6703
6766
|
/**
|
6704
6767
|
* Checks if the extension has the specified permissions.
|
6705
|
-
*
|
6768
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
6706
6769
|
*/
|
6707
6770
|
export function contains(permissions: Permissions): Promise<boolean>;
|
6708
|
-
/**
|
6709
|
-
* Checks if the extension has the specified permissions.
|
6710
|
-
* Parameter result: True if the extension has the specified permissions.
|
6711
|
-
*/
|
6712
6771
|
export function contains(permissions: Permissions, callback: (result: boolean) => void): void;
|
6772
|
+
|
6713
6773
|
/**
|
6714
6774
|
* Gets the extension's current set of permissions.
|
6715
|
-
*
|
6775
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
6716
6776
|
*/
|
6717
6777
|
export function getAll(): Promise<Permissions>;
|
6718
|
-
/**
|
6719
|
-
* Gets the extension's current set of permissions.
|
6720
|
-
*/
|
6721
6778
|
export function getAll(callback: (permissions: Permissions) => void): void;
|
6779
|
+
|
6722
6780
|
/**
|
6723
|
-
* Requests access to the specified permissions
|
6724
|
-
*
|
6781
|
+
* Requests access to the specified permissions, displaying a prompt to the user if necessary.
|
6782
|
+
* These permissions must either be defined in the optional_permissions field of the manifest or be required permissions that were withheld by the user.
|
6783
|
+
* Paths on origin patterns will be ignored.
|
6784
|
+
* You can request subsets of optional origin permissions; for example, if you specify `*://*\/*` in the `optional_permissions` section of the manifest, you can request `http://example.com/`.
|
6785
|
+
* If there are any problems requesting the permissions, {@link runtime.lastError} will be set.
|
6786
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
6725
6787
|
*/
|
6726
6788
|
export function request(permissions: Permissions): Promise<boolean>;
|
6789
|
+
export function request(permissions: Permissions, callback: (granted: boolean) => void): void;
|
6790
|
+
|
6727
6791
|
/**
|
6728
|
-
*
|
6729
|
-
*
|
6730
|
-
*/
|
6731
|
-
export function request(permissions: Permissions, callback?: (granted: boolean) => void): void;
|
6732
|
-
/**
|
6733
|
-
* Removes access to the specified permissions. If there are any problems removing the permissions, runtime.lastError will be set.
|
6734
|
-
* @return A Promise that resolves with boolean: True if the permissions were removed.
|
6792
|
+
* Removes access to the specified permissions. If there are any problems removing the permissions, {@link runtime.lastError} will be set.
|
6793
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
6735
6794
|
*/
|
6736
6795
|
export function remove(permissions: Permissions): Promise<boolean>;
|
6737
|
-
|
6738
|
-
* Removes access to the specified permissions. If there are any problems removing the permissions, runtime.lastError will be set.
|
6739
|
-
* Parameter removed: True if the permissions were removed.
|
6740
|
-
*/
|
6741
|
-
export function remove(permissions: Permissions, callback?: (removed: boolean) => void): void;
|
6796
|
+
export function remove(permissions: Permissions, callback: (removed: boolean) => void): void;
|
6742
6797
|
|
6743
6798
|
/** Fired when access to permissions has been removed from the extension. */
|
6744
|
-
export
|
6799
|
+
export const onRemoved: chrome.events.Event<(permissions: Permissions) => void>;
|
6800
|
+
|
6745
6801
|
/** Fired when the extension acquires new permissions. */
|
6746
|
-
export
|
6802
|
+
export const onAdded: chrome.events.Event<(permissions: Permissions) => void>;
|
6747
6803
|
}
|
6748
6804
|
|
6749
6805
|
////////////////////
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.290",
|
4
4
|
"description": "TypeScript definitions for chrome",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
|
6
6
|
"license": "MIT",
|
@@ -94,6 +94,6 @@
|
|
94
94
|
"@types/har-format": "*"
|
95
95
|
},
|
96
96
|
"peerDependencies": {},
|
97
|
-
"typesPublisherContentHash": "
|
97
|
+
"typesPublisherContentHash": "57db3a57f8b9ab022dab39d5b98c70ae66ae04896cff31262c908ab55f02df12",
|
98
98
|
"typeScriptVersion": "5.0"
|
99
99
|
}
|