chrome-types 0.1.407 → 0.1.408
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_all.d.ts +162 -2
- package/index.d.ts +190 -2
- package/package.json +2 -2
package/_all.d.ts
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
// Generated on Wed Jan 07 2026
|
|
18
|
-
// Built at
|
|
17
|
+
// Generated on Wed Jan 07 2026 16:17:46 GMT+0000 (Coordinated Universal Time)
|
|
18
|
+
// Built at c91f575e0cb9bde5c5d1901c457703397f3ea4f0
|
|
19
19
|
|
|
20
20
|
// Includes all types, including MV2 + Platform Apps APIs.
|
|
21
21
|
|
|
@@ -786,6 +786,7 @@ declare namespace chrome {
|
|
|
786
786
|
* @chrome-returns-extra since Chrome 111
|
|
787
787
|
* @param name Optional name to identify this alarm. Defaults to the empty string.
|
|
788
788
|
* @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either `when` or `delayInMinutes` (but not both). If `periodInMinutes` is set, the alarm will repeat every `periodInMinutes` minutes after the initial event. If neither `when` or `delayInMinutes` is set for a repeating alarm, `periodInMinutes` is used as the default for `delayInMinutes`.
|
|
789
|
+
* @returns Promise that resolves when the alarm has been created.
|
|
789
790
|
*/
|
|
790
791
|
export function create(
|
|
791
792
|
|
|
@@ -803,6 +804,7 @@ declare namespace chrome {
|
|
|
803
804
|
*
|
|
804
805
|
* @chrome-returns-extra since Chrome 111
|
|
805
806
|
* @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either `when` or `delayInMinutes` (but not both). If `periodInMinutes` is set, the alarm will repeat every `periodInMinutes` minutes after the initial event. If neither `when` or `delayInMinutes` is set for a repeating alarm, `periodInMinutes` is used as the default for `delayInMinutes`.
|
|
807
|
+
* @returns Promise that resolves when the alarm has been created.
|
|
806
808
|
*/
|
|
807
809
|
export function create(
|
|
808
810
|
|
|
@@ -1907,6 +1909,7 @@ declare namespace chrome {
|
|
|
1907
1909
|
*
|
|
1908
1910
|
* @chrome-returns-extra since Chrome 116
|
|
1909
1911
|
* @param filter Device properties by which to filter the list of returned audio devices. If the filter is not set or set to `{}`, returned device list will contain all available audio devices.
|
|
1912
|
+
* @returns Reports the requested list of audio devices.
|
|
1910
1913
|
*/
|
|
1911
1914
|
export function getDevices(
|
|
1912
1915
|
|
|
@@ -1987,6 +1990,7 @@ declare namespace chrome {
|
|
|
1987
1990
|
*
|
|
1988
1991
|
* @chrome-returns-extra since Chrome 116
|
|
1989
1992
|
* @param streamType Stream type for which mute state should be fetched.
|
|
1993
|
+
* @returns Promise that resolves with a boolean indicating whether mute is set or not for specified stream type.
|
|
1990
1994
|
*/
|
|
1991
1995
|
export function getMute(
|
|
1992
1996
|
|
|
@@ -5048,6 +5052,7 @@ declare namespace chrome {
|
|
|
5048
5052
|
*
|
|
5049
5053
|
* @chrome-returns-extra since Chrome 96
|
|
5050
5054
|
* @param dataToRemove The set of data types to remove.
|
|
5055
|
+
* @returns Resolves when deletion has completed.
|
|
5051
5056
|
*/
|
|
5052
5057
|
export function remove(
|
|
5053
5058
|
|
|
@@ -5074,6 +5079,7 @@ declare namespace chrome {
|
|
|
5074
5079
|
* Clears websites' appcache data.
|
|
5075
5080
|
*
|
|
5076
5081
|
* @chrome-returns-extra since Chrome 96
|
|
5082
|
+
* @returns Resolves when websites' appcache data has been cleared.
|
|
5077
5083
|
*/
|
|
5078
5084
|
export function removeAppcache(
|
|
5079
5085
|
|
|
@@ -5094,6 +5100,7 @@ declare namespace chrome {
|
|
|
5094
5100
|
* Clears the browser's cache.
|
|
5095
5101
|
*
|
|
5096
5102
|
* @chrome-returns-extra since Chrome 96
|
|
5103
|
+
* @returns Resolves when the browser's cache has been cleared.
|
|
5097
5104
|
*/
|
|
5098
5105
|
export function removeCache(
|
|
5099
5106
|
|
|
@@ -5114,6 +5121,7 @@ declare namespace chrome {
|
|
|
5114
5121
|
* Clears websites' cache storage data.
|
|
5115
5122
|
*
|
|
5116
5123
|
* @chrome-returns-extra since Chrome 96
|
|
5124
|
+
* @returns Resolves when websites' cache storage has been cleared.
|
|
5117
5125
|
* @since Chrome 72
|
|
5118
5126
|
*/
|
|
5119
5127
|
export function removeCacheStorage(
|
|
@@ -5137,6 +5145,7 @@ declare namespace chrome {
|
|
|
5137
5145
|
* Clears the browser's cookies and server-bound certificates modified within a particular timeframe.
|
|
5138
5146
|
*
|
|
5139
5147
|
* @chrome-returns-extra since Chrome 96
|
|
5148
|
+
* @returns Resolves when the browser's cookies and server-bound certificates have been cleared.
|
|
5140
5149
|
*/
|
|
5141
5150
|
export function removeCookies(
|
|
5142
5151
|
|
|
@@ -5157,6 +5166,7 @@ declare namespace chrome {
|
|
|
5157
5166
|
* Clears the browser's list of downloaded files (_not_ the downloaded files themselves).
|
|
5158
5167
|
*
|
|
5159
5168
|
* @chrome-returns-extra since Chrome 96
|
|
5169
|
+
* @returns Resolves when the browser's list of downloaded files has been cleared.
|
|
5160
5170
|
*/
|
|
5161
5171
|
export function removeDownloads(
|
|
5162
5172
|
|
|
@@ -5177,6 +5187,7 @@ declare namespace chrome {
|
|
|
5177
5187
|
* Clears websites' file system data.
|
|
5178
5188
|
*
|
|
5179
5189
|
* @chrome-returns-extra since Chrome 96
|
|
5190
|
+
* @returns Resolves when websites' file systems have been cleared.
|
|
5180
5191
|
*/
|
|
5181
5192
|
export function removeFileSystems(
|
|
5182
5193
|
|
|
@@ -5197,6 +5208,7 @@ declare namespace chrome {
|
|
|
5197
5208
|
* Clears the browser's stored form data (autofill).
|
|
5198
5209
|
*
|
|
5199
5210
|
* @chrome-returns-extra since Chrome 96
|
|
5211
|
+
* @returns Resolves when the browser's form data has been cleared.
|
|
5200
5212
|
*/
|
|
5201
5213
|
export function removeFormData(
|
|
5202
5214
|
|
|
@@ -5217,6 +5229,7 @@ declare namespace chrome {
|
|
|
5217
5229
|
* Clears the browser's history.
|
|
5218
5230
|
*
|
|
5219
5231
|
* @chrome-returns-extra since Chrome 96
|
|
5232
|
+
* @returns Resolves when the browser's history has cleared.
|
|
5220
5233
|
*/
|
|
5221
5234
|
export function removeHistory(
|
|
5222
5235
|
|
|
@@ -5237,6 +5250,7 @@ declare namespace chrome {
|
|
|
5237
5250
|
* Clears websites' IndexedDB data.
|
|
5238
5251
|
*
|
|
5239
5252
|
* @chrome-returns-extra since Chrome 96
|
|
5253
|
+
* @returns Resolves when websites' IndexedDB data has been cleared.
|
|
5240
5254
|
*/
|
|
5241
5255
|
export function removeIndexedDB(
|
|
5242
5256
|
|
|
@@ -5257,6 +5271,7 @@ declare namespace chrome {
|
|
|
5257
5271
|
* Clears websites' local storage data.
|
|
5258
5272
|
*
|
|
5259
5273
|
* @chrome-returns-extra since Chrome 96
|
|
5274
|
+
* @returns Resolves when websites' local storage has been cleared.
|
|
5260
5275
|
*/
|
|
5261
5276
|
export function removeLocalStorage(
|
|
5262
5277
|
|
|
@@ -5277,6 +5292,7 @@ declare namespace chrome {
|
|
|
5277
5292
|
* Clears plugins' data.
|
|
5278
5293
|
*
|
|
5279
5294
|
* @chrome-returns-extra since Chrome 96
|
|
5295
|
+
* @returns Resolves when plugins' data has been cleared.
|
|
5280
5296
|
* @deprecated Support for Flash has been removed. This function has no effect.
|
|
5281
5297
|
* @chrome-deprecated-since Chrome 88
|
|
5282
5298
|
*/
|
|
@@ -5302,6 +5318,7 @@ declare namespace chrome {
|
|
|
5302
5318
|
* Clears the browser's stored passwords.
|
|
5303
5319
|
*
|
|
5304
5320
|
* @chrome-returns-extra since Chrome 96
|
|
5321
|
+
* @returns Resolves when the browser's passwords have been cleared.
|
|
5305
5322
|
* @deprecated Support for password deletion through extensions has been removed. This function has no effect.
|
|
5306
5323
|
*/
|
|
5307
5324
|
export function removePasswords(
|
|
@@ -5325,6 +5342,7 @@ declare namespace chrome {
|
|
|
5325
5342
|
* Clears websites' service workers.
|
|
5326
5343
|
*
|
|
5327
5344
|
* @chrome-returns-extra since Chrome 96
|
|
5345
|
+
* @returns Resolves when websites' service workers have been cleared.
|
|
5328
5346
|
* @since Chrome 72
|
|
5329
5347
|
*/
|
|
5330
5348
|
export function removeServiceWorkers(
|
|
@@ -5348,6 +5366,7 @@ declare namespace chrome {
|
|
|
5348
5366
|
* Clears websites' WebSQL data.
|
|
5349
5367
|
*
|
|
5350
5368
|
* @chrome-returns-extra since Chrome 96
|
|
5369
|
+
* @returns Resolves when websites' WebSQL databases have been cleared.
|
|
5351
5370
|
*/
|
|
5352
5371
|
export function removeWebSQL(
|
|
5353
5372
|
|
|
@@ -5678,6 +5697,7 @@ declare namespace chrome {
|
|
|
5678
5697
|
*
|
|
5679
5698
|
* @chrome-returns-extra since Chrome 96
|
|
5680
5699
|
* @param details Contains the details about the requested dialog.
|
|
5700
|
+
* @returns Returns a Promise which resolves when the PIN is provided by the user. Rejects with an error if the dialog request finishes unsuccessfully (e.g. the dialog was canceled by the user or was not allowed to be shown).
|
|
5681
5701
|
* @since Chrome 57
|
|
5682
5702
|
*/
|
|
5683
5703
|
export function requestPin(
|
|
@@ -5705,6 +5725,7 @@ declare namespace chrome {
|
|
|
5705
5725
|
*
|
|
5706
5726
|
* @chrome-returns-extra since Chrome 96
|
|
5707
5727
|
* @param details Contains the details about the reason for stopping the request flow.
|
|
5728
|
+
* @returns Returns a Promise which resolves when the request to close the PIN dialog is complete.
|
|
5708
5729
|
* @since Chrome 57
|
|
5709
5730
|
*/
|
|
5710
5731
|
export function stopPinRequest(
|
|
@@ -5732,6 +5753,7 @@ declare namespace chrome {
|
|
|
5732
5753
|
*
|
|
5733
5754
|
* @chrome-returns-extra since Chrome 96
|
|
5734
5755
|
* @param details The certificates to set. Invalid certificates will be ignored.
|
|
5756
|
+
* @returns Returns a Promise which resolves upon completion.
|
|
5735
5757
|
* @since Chrome 86
|
|
5736
5758
|
*/
|
|
5737
5759
|
export function setCertificates(
|
|
@@ -5939,6 +5961,7 @@ declare namespace chrome {
|
|
|
5939
5961
|
* Returns all the registered extension commands for this extension and their shortcut (if active). Before Chrome 110, this command did not return `_execute_action`.
|
|
5940
5962
|
*
|
|
5941
5963
|
* @chrome-returns-extra since Chrome 96
|
|
5964
|
+
* @returns Resolves with a list of the registered commands.
|
|
5942
5965
|
*/
|
|
5943
5966
|
export function getAll(): Promise<Command[]>;
|
|
5944
5967
|
|
|
@@ -6664,6 +6687,7 @@ declare namespace chrome {
|
|
|
6664
6687
|
* @chrome-returns-extra since Chrome 123
|
|
6665
6688
|
* @param id The ID of the item to update.
|
|
6666
6689
|
* @param updateProperties The properties to update. Accepts the same values as the {@link contextMenus.create} function.
|
|
6690
|
+
* @returns Resolves when the context menu has been updated.
|
|
6667
6691
|
*/
|
|
6668
6692
|
export function update(
|
|
6669
6693
|
|
|
@@ -6774,6 +6798,7 @@ declare namespace chrome {
|
|
|
6774
6798
|
*
|
|
6775
6799
|
* @chrome-returns-extra since Chrome 123
|
|
6776
6800
|
* @param menuItemId The ID of the context menu item to remove.
|
|
6801
|
+
* @returns Resolves when the context menu has been removed.
|
|
6777
6802
|
*/
|
|
6778
6803
|
export function remove(
|
|
6779
6804
|
|
|
@@ -6796,6 +6821,7 @@ declare namespace chrome {
|
|
|
6796
6821
|
* Removes all context menu items added by this extension.
|
|
6797
6822
|
*
|
|
6798
6823
|
* @chrome-returns-extra since Chrome 123
|
|
6824
|
+
* @returns Resolves when removal is complete.
|
|
6799
6825
|
*/
|
|
6800
6826
|
export function removeAll(): Promise<void>;
|
|
6801
6827
|
|
|
@@ -7581,6 +7607,7 @@ declare namespace chrome {
|
|
|
7581
7607
|
* @chrome-returns-extra since Chrome 96
|
|
7582
7608
|
* @param target Debugging target to which you want to attach.
|
|
7583
7609
|
* @param requiredVersion Required debugging protocol version ("0.1"). One can only attach to the debuggee with matching major version and greater or equal minor version. List of the protocol versions can be obtained [here](https://developer.chrome.com/devtools/docs/debugger-protocol).
|
|
7610
|
+
* @returns Resolves once the attach operation succeeds or fails. The promise resolves with no value. If the attach fails, the promise will be rejected.
|
|
7584
7611
|
*/
|
|
7585
7612
|
export function attach(
|
|
7586
7613
|
|
|
@@ -7609,6 +7636,7 @@ declare namespace chrome {
|
|
|
7609
7636
|
*
|
|
7610
7637
|
* @chrome-returns-extra since Chrome 96
|
|
7611
7638
|
* @param target Debugging target from which you want to detach.
|
|
7639
|
+
* @returns Resolves once the detach operation succeeds or fails. The promise resolves with no value. If the detach fails, the promise will be rejected.
|
|
7612
7640
|
*/
|
|
7613
7641
|
export function detach(
|
|
7614
7642
|
|
|
@@ -7634,6 +7662,7 @@ declare namespace chrome {
|
|
|
7634
7662
|
* @param target Debugging target to which you want to send the command.
|
|
7635
7663
|
* @param method Method name. Should be one of the methods defined by the [remote debugging protocol](https://developer.chrome.com/devtools/docs/debugger-protocol).
|
|
7636
7664
|
* @param commandParams JSON object with request parameters. This object must conform to the remote debugging params scheme for given method.
|
|
7665
|
+
* @returns Response body. If an error occurs while posting the message, the promise will be rejected.
|
|
7637
7666
|
*/
|
|
7638
7667
|
export function sendCommand(
|
|
7639
7668
|
|
|
@@ -8700,6 +8729,7 @@ declare namespace chrome {
|
|
|
8700
8729
|
* * {@link MAX_NUMBER_OF_DYNAMIC_RULES} is the maximum number of dynamic rules an extension can add. The number of [unsafe rules](https://developer.chrome.com/docs/extensions/reference/declarativeNetRequest/#safe_rules) must not exceed {@link MAX_NUMBER_OF_UNSAFE_DYNAMIC_RULES}.
|
|
8701
8730
|
*
|
|
8702
8731
|
* @chrome-returns-extra since Chrome 91
|
|
8732
|
+
* @returns Promise that resolves once the update is complete. In case of an error, the promise will be rejected and no change will be made to the rule set. This can happen for multiple reasons, such as invalid rule format, duplicate rule ID, rule count limit exceeded, internal errors, and others.
|
|
8703
8733
|
*/
|
|
8704
8734
|
export function updateDynamicRules(
|
|
8705
8735
|
|
|
@@ -8732,6 +8762,7 @@ declare namespace chrome {
|
|
|
8732
8762
|
*
|
|
8733
8763
|
* @chrome-returns-extra since Chrome 91
|
|
8734
8764
|
* @param filter An object to filter the list of fetched rules.
|
|
8765
|
+
* @returns Promise that resolves with the set of dynamic rules. The Promise may be rejected in case of transient internal errors.
|
|
8735
8766
|
*/
|
|
8736
8767
|
export function getDynamicRules(
|
|
8737
8768
|
|
|
@@ -8766,6 +8797,7 @@ declare namespace chrome {
|
|
|
8766
8797
|
* * {@link MAX_NUMBER_OF_SESSION_RULES} is the maximum number of session rules an extension can add.
|
|
8767
8798
|
*
|
|
8768
8799
|
* @chrome-returns-extra since Chrome 91
|
|
8800
|
+
* @returns Promise that resolves once the update is complete. In case of an error, the promise will be rejected and no change will be made to the rule set. This can happen for multiple reasons, such as invalid rule format, duplicate rule ID, rule count limit exceeded, and others.
|
|
8769
8801
|
* @since Chrome 90
|
|
8770
8802
|
*/
|
|
8771
8803
|
export function updateSessionRules(
|
|
@@ -8794,6 +8826,7 @@ declare namespace chrome {
|
|
|
8794
8826
|
*
|
|
8795
8827
|
* @chrome-returns-extra since Chrome 91
|
|
8796
8828
|
* @param filter An object to filter the list of fetched rules.
|
|
8829
|
+
* @returns Promise that resolves with the set of session scoped rules.
|
|
8797
8830
|
* @since Chrome 90
|
|
8798
8831
|
*/
|
|
8799
8832
|
export function getSessionRules(
|
|
@@ -8827,6 +8860,7 @@ declare namespace chrome {
|
|
|
8827
8860
|
* Note that the set of enabled static rulesets is persisted across sessions but not across extension updates, i.e. the `rule_resources` manifest key will determine the set of enabled static rulesets on each extension update.
|
|
8828
8861
|
*
|
|
8829
8862
|
* @chrome-returns-extra since Chrome 91
|
|
8863
|
+
* @returns Promise that resolves once the update is complete. In case of an error, the promise will be rejected and no change will be made to the set of enabled rulesets. This can happen for multiple reasons, such as invalid ruleset IDs, rule count limit exceeded, or internal errors.
|
|
8830
8864
|
*/
|
|
8831
8865
|
export function updateEnabledRulesets(
|
|
8832
8866
|
|
|
@@ -8854,6 +8888,7 @@ declare namespace chrome {
|
|
|
8854
8888
|
* Returns the ids for the current set of enabled static rulesets.
|
|
8855
8889
|
*
|
|
8856
8890
|
* @chrome-returns-extra since Chrome 91
|
|
8891
|
+
* @returns Promise that resolves with a list of ids, where each id corresponds to an enabled static {@link Ruleset}.
|
|
8857
8892
|
*/
|
|
8858
8893
|
export function getEnabledRulesets(): Promise<string[]>;
|
|
8859
8894
|
|
|
@@ -8870,6 +8905,7 @@ declare namespace chrome {
|
|
|
8870
8905
|
/**
|
|
8871
8906
|
* Disables and enables individual static rules in a {@link Ruleset}. Changes to rules belonging to a disabled {@link Ruleset} will take effect the next time that it becomes enabled.
|
|
8872
8907
|
*
|
|
8908
|
+
* @returns Promise that resolves when the update is complete. In case of an error, the promise will be rejected and no change will be made to the enabled static rules.
|
|
8873
8909
|
* @since Chrome 111
|
|
8874
8910
|
*/
|
|
8875
8911
|
export function updateStaticRules(
|
|
@@ -8893,6 +8929,7 @@ declare namespace chrome {
|
|
|
8893
8929
|
* Returns the list of static rules in the given {@link Ruleset} that are currently disabled.
|
|
8894
8930
|
*
|
|
8895
8931
|
* @param options Specifies the ruleset to query.
|
|
8932
|
+
* @returns Promise that resolves with a list of ids that correspond to the disabled rules in that ruleset.
|
|
8896
8933
|
* @since Chrome 111
|
|
8897
8934
|
*/
|
|
8898
8935
|
export function getDisabledRuleIds(
|
|
@@ -8920,6 +8957,7 @@ declare namespace chrome {
|
|
|
8920
8957
|
*
|
|
8921
8958
|
* @chrome-returns-extra since Chrome 91
|
|
8922
8959
|
* @param filter An object to filter the list of matched rules.
|
|
8960
|
+
* @returns Promise that resolves once the list of matched rules has been fetched. In case of an error, the Promise will be rejected. This can happen for multiple reasons, such as insufficient permissions, or exceeding the quota.
|
|
8923
8961
|
*/
|
|
8924
8962
|
export function getMatchedRules(
|
|
8925
8963
|
|
|
@@ -8971,6 +9009,7 @@ declare namespace chrome {
|
|
|
8971
9009
|
*
|
|
8972
9010
|
* @chrome-returns-extra since Chrome 91
|
|
8973
9011
|
* @param regexOptions The regular expression to check.
|
|
9012
|
+
* @returns Promise that resolves with details consisting of whether the regular expression is supported and the reason if not.
|
|
8974
9013
|
* @since Chrome 87
|
|
8975
9014
|
*/
|
|
8976
9015
|
export function isRegexSupported(
|
|
@@ -9016,6 +9055,7 @@ declare namespace chrome {
|
|
|
9016
9055
|
/**
|
|
9017
9056
|
* Checks if any of the extension's declarativeNetRequest rules would match a hypothetical request. Note: Only available for unpacked extensions as this is only intended to be used during extension development.
|
|
9018
9057
|
*
|
|
9058
|
+
* @returns Promise that resolves with the details of matched rules.
|
|
9019
9059
|
* @since Chrome 103
|
|
9020
9060
|
*/
|
|
9021
9061
|
export function testMatchOutcome(
|
|
@@ -10472,6 +10512,7 @@ declare namespace chrome {
|
|
|
10472
10512
|
* Resolves the given hostname or IP address literal.
|
|
10473
10513
|
*
|
|
10474
10514
|
* @param hostname The hostname to resolve.
|
|
10515
|
+
* @returns Promise that resolves when the resolution operation completes.
|
|
10475
10516
|
*/
|
|
10476
10517
|
export function resolve(
|
|
10477
10518
|
|
|
@@ -11002,6 +11043,7 @@ declare namespace chrome {
|
|
|
11002
11043
|
*
|
|
11003
11044
|
* @chrome-returns-extra since Chrome 96
|
|
11004
11045
|
* @param options An object containing scan parameters.
|
|
11046
|
+
* @returns Returns a Promise which resolves with the scan results.
|
|
11005
11047
|
*/
|
|
11006
11048
|
export function scan(
|
|
11007
11049
|
|
|
@@ -11026,6 +11068,7 @@ declare namespace chrome {
|
|
|
11026
11068
|
* Gets the list of available scanners and returns a Promise that resolves with a {@link GetScannerListResponse} object. If a callback is passed to this function, returned data is passed to it instead.
|
|
11027
11069
|
*
|
|
11028
11070
|
* @param filter A {@link DeviceFilter} indicating which types of scanners should be returned.
|
|
11071
|
+
* @returns Returns a Promise which resolves with the result and list of scanners.
|
|
11029
11072
|
* @since Chrome 125
|
|
11030
11073
|
*/
|
|
11031
11074
|
export function getScannerList(
|
|
@@ -11052,6 +11095,7 @@ declare namespace chrome {
|
|
|
11052
11095
|
* Opens a scanner for exclusive access and returns a Promise that resolves with an {@link OpenScannerResponse} object. If a callback is passed to this function, returned data is passed to it instead.
|
|
11053
11096
|
*
|
|
11054
11097
|
* @param scannerId The ID of a scanner to be opened. This value is one returned from a previous call to {@link getScannerList}.
|
|
11098
|
+
* @returns Returns a Promise which resolves with the result.
|
|
11055
11099
|
* @since Chrome 125
|
|
11056
11100
|
*/
|
|
11057
11101
|
export function openScanner(
|
|
@@ -11078,6 +11122,7 @@ declare namespace chrome {
|
|
|
11078
11122
|
* Gets the group names and member options from a scanner previously opened by {@link openScanner}. This method returns a Promise that resolves with a {@link GetOptionGroupsResponse} object. If a callback is passed to this function, returned data is passed to it instead.
|
|
11079
11123
|
*
|
|
11080
11124
|
* @param scannerHandle The handle of an open scanner returned from a call to {@link openScanner}.
|
|
11125
|
+
* @returns Returns a Promise which resolves with the result.
|
|
11081
11126
|
* @since Chrome 125
|
|
11082
11127
|
*/
|
|
11083
11128
|
export function getOptionGroups(
|
|
@@ -11104,6 +11149,7 @@ declare namespace chrome {
|
|
|
11104
11149
|
* Closes the scanner with the passed in handle and returns a Promise that resolves with a {@link CloseScannerResponse} object. If a callback is used, the object is passed to it instead. Even if the response is not a success, the supplied handle becomes invalid and should not be used for further operations.
|
|
11105
11150
|
*
|
|
11106
11151
|
* @param scannerHandle Specifies the handle of an open scanner that was previously returned from a call to {@link openScanner}.
|
|
11152
|
+
* @returns Returns a Promise which resolves with the result.
|
|
11107
11153
|
* @since Chrome 125
|
|
11108
11154
|
*/
|
|
11109
11155
|
export function closeScanner(
|
|
@@ -11131,6 +11177,7 @@ declare namespace chrome {
|
|
|
11131
11177
|
*
|
|
11132
11178
|
* @param scannerHandle The handle of the scanner to set options on. This should be a value previously returned from a call to {@link openScanner}.
|
|
11133
11179
|
* @param options A list of `OptionSetting` objects to be applied to the scanner.
|
|
11180
|
+
* @returns Returns a Promise which resolves with the result.
|
|
11134
11181
|
* @since Chrome 125
|
|
11135
11182
|
*/
|
|
11136
11183
|
export function setOptions(
|
|
@@ -11163,6 +11210,7 @@ declare namespace chrome {
|
|
|
11163
11210
|
*
|
|
11164
11211
|
* @param scannerHandle The handle of an open scanner. This should be a value previously returned from a call to {@link openScanner}.
|
|
11165
11212
|
* @param options A {@link StartScanOptions} object indicating the options to be used for the scan. The `StartScanOptions.format` property must match one of the entries returned in the scanner's `ScannerInfo`.
|
|
11213
|
+
* @returns Returns a Promise which resolves with the result.
|
|
11166
11214
|
* @since Chrome 125
|
|
11167
11215
|
*/
|
|
11168
11216
|
export function startScan(
|
|
@@ -11194,6 +11242,7 @@ declare namespace chrome {
|
|
|
11194
11242
|
* Cancels a started scan and returns a Promise that resolves with a {@link CancelScanResponse} object. If a callback is used, the object is passed to it instead.
|
|
11195
11243
|
*
|
|
11196
11244
|
* @param job The handle of an active scan job previously returned from a call to {@link startScan}.
|
|
11245
|
+
* @returns Returns a Promise which resolves with the result.
|
|
11197
11246
|
* @since Chrome 125
|
|
11198
11247
|
*/
|
|
11199
11248
|
export function cancelScan(
|
|
@@ -11224,6 +11273,7 @@ declare namespace chrome {
|
|
|
11224
11273
|
* When the scan job completes, the response will have the result value of `EOF`. This response may contain a final non-zero `data` member.
|
|
11225
11274
|
*
|
|
11226
11275
|
* @param job Active job handle previously returned from {@link startScan}.
|
|
11276
|
+
* @returns Returns a Promise which resolves with the result.
|
|
11227
11277
|
* @since Chrome 125
|
|
11228
11278
|
*/
|
|
11229
11279
|
export function readScanData(
|
|
@@ -11796,6 +11846,7 @@ declare namespace chrome {
|
|
|
11796
11846
|
*
|
|
11797
11847
|
* @chrome-returns-extra since Chrome 96
|
|
11798
11848
|
* @param options What to download and how.
|
|
11849
|
+
* @returns Returns a Promise which resolves with the id of the new {@link DownloadItem}.
|
|
11799
11850
|
*/
|
|
11800
11851
|
export function download(
|
|
11801
11852
|
|
|
@@ -11843,6 +11894,7 @@ declare namespace chrome {
|
|
|
11843
11894
|
*
|
|
11844
11895
|
* @chrome-returns-extra since Chrome 96
|
|
11845
11896
|
* @param downloadId The id of the download to pause.
|
|
11897
|
+
* @returns Returns a Promise which resolves when the pause request is completed.
|
|
11846
11898
|
*/
|
|
11847
11899
|
export function pause(
|
|
11848
11900
|
|
|
@@ -11866,6 +11918,7 @@ declare namespace chrome {
|
|
|
11866
11918
|
*
|
|
11867
11919
|
* @chrome-returns-extra since Chrome 96
|
|
11868
11920
|
* @param downloadId The id of the download to resume.
|
|
11921
|
+
* @returns Returns a Promise which resolves when the resume request is completed.
|
|
11869
11922
|
*/
|
|
11870
11923
|
export function resume(
|
|
11871
11924
|
|
|
@@ -11889,6 +11942,7 @@ declare namespace chrome {
|
|
|
11889
11942
|
*
|
|
11890
11943
|
* @chrome-returns-extra since Chrome 96
|
|
11891
11944
|
* @param downloadId The id of the download to cancel.
|
|
11945
|
+
* @returns Returns a Promise which resolves when the cancel request is completed.
|
|
11892
11946
|
*/
|
|
11893
11947
|
export function cancel(
|
|
11894
11948
|
|
|
@@ -11912,6 +11966,7 @@ declare namespace chrome {
|
|
|
11912
11966
|
*
|
|
11913
11967
|
* @chrome-returns-extra since Chrome 96
|
|
11914
11968
|
* @param downloadId The identifier for the download.
|
|
11969
|
+
* @returns Returns a Promise which resolves with a URL to an image that represents the download.
|
|
11915
11970
|
*/
|
|
11916
11971
|
export function getFileIcon(
|
|
11917
11972
|
|
|
@@ -12024,6 +12079,7 @@ declare namespace chrome {
|
|
|
12024
12079
|
*
|
|
12025
12080
|
* @chrome-returns-extra since Chrome 96
|
|
12026
12081
|
* @param downloadId The identifier for the {@link DownloadItem}.
|
|
12082
|
+
* @returns Returns a Promise which resolves when the danger prompt dialog closes.
|
|
12027
12083
|
*/
|
|
12028
12084
|
export function acceptDanger(
|
|
12029
12085
|
|
|
@@ -12057,6 +12113,7 @@ declare namespace chrome {
|
|
|
12057
12113
|
* Change the download UI of every window associated with the current browser profile. As long as at least one extension has set {@link UiOptions.enabled} to false, the download UI will be hidden. Setting {@link UiOptions.enabled} to true while at least one other extension has disabled it will return an error through {@link runtime.lastError}. Requires the `"downloads.ui"` permission in addition to the `"downloads"` permission.
|
|
12058
12114
|
*
|
|
12059
12115
|
* @param options Encapsulate a change to the download UI.
|
|
12116
|
+
* @returns Returns a Promise which resolves when the UI update is completed.
|
|
12060
12117
|
* @since Chrome 105
|
|
12061
12118
|
*/
|
|
12062
12119
|
export function setUiOptions(
|
|
@@ -12092,6 +12149,7 @@ declare namespace chrome {
|
|
|
12092
12149
|
* Fetches the value of [the device identifier of the directory API](https://developers.google.com/admin-sdk/directory/v1/guides/manage-chrome-devices), that is generated by the server and identifies the cloud record of the device for querying in the cloud directory API. If the current user is not affiliated, returns an empty string.
|
|
12093
12150
|
*
|
|
12094
12151
|
* @chrome-returns-extra since Chrome 96
|
|
12152
|
+
* @returns Returns a Promise which resolves with the device identifier of the directory API.
|
|
12095
12153
|
*/
|
|
12096
12154
|
export function getDirectoryDeviceId(): Promise<string>;
|
|
12097
12155
|
|
|
@@ -12109,6 +12167,7 @@ declare namespace chrome {
|
|
|
12109
12167
|
* Fetches the device's serial number. Please note the purpose of this API is to administrate the device (e.g. generating Certificate Sign Requests for device-wide certificates). This API may not be used for tracking devices without the consent of the device's administrator. If the current user is not affiliated, returns an empty string.
|
|
12110
12168
|
*
|
|
12111
12169
|
* @chrome-returns-extra since Chrome 96
|
|
12170
|
+
* @returns Returns a Promise which resolves with the serial number of the device.
|
|
12112
12171
|
* @since Chrome 66
|
|
12113
12172
|
*/
|
|
12114
12173
|
export function getDeviceSerialNumber(): Promise<string>;
|
|
@@ -12129,6 +12188,7 @@ declare namespace chrome {
|
|
|
12129
12188
|
* Fetches the administrator-annotated Asset Id. If the current user is not affiliated or no Asset Id has been set by the administrator, returns an empty string.
|
|
12130
12189
|
*
|
|
12131
12190
|
* @chrome-returns-extra since Chrome 96
|
|
12191
|
+
* @returns Returns a Promise which resolves with the Asset ID of the device.
|
|
12132
12192
|
* @since Chrome 66
|
|
12133
12193
|
*/
|
|
12134
12194
|
export function getDeviceAssetId(): Promise<string>;
|
|
@@ -12149,6 +12209,7 @@ declare namespace chrome {
|
|
|
12149
12209
|
* Fetches the administrator-annotated Location. If the current user is not affiliated or no Annotated Location has been set by the administrator, returns an empty string.
|
|
12150
12210
|
*
|
|
12151
12211
|
* @chrome-returns-extra since Chrome 96
|
|
12212
|
+
* @returns Returns a Promise which resolves with the Annotated Location of the device.
|
|
12152
12213
|
* @since Chrome 66
|
|
12153
12214
|
*/
|
|
12154
12215
|
export function getDeviceAnnotatedLocation(): Promise<string>;
|
|
@@ -12169,6 +12230,7 @@ declare namespace chrome {
|
|
|
12169
12230
|
* Fetches the device's hostname as set by DeviceHostnameTemplate policy. If the current user is not affiliated or no hostname has been set by the enterprise policy, returns an empty string.
|
|
12170
12231
|
*
|
|
12171
12232
|
* @chrome-returns-extra since Chrome 96
|
|
12233
|
+
* @returns Returns a Promise which resolves with the hostname of the device.
|
|
12172
12234
|
* @since Chrome 82
|
|
12173
12235
|
*/
|
|
12174
12236
|
export function getDeviceHostname(): Promise<string>;
|
|
@@ -12206,6 +12268,7 @@ declare namespace chrome {
|
|
|
12206
12268
|
* Obtains the manufacturer and model for the hardware platform and, if the extension is authorized, returns it via `callback`.
|
|
12207
12269
|
*
|
|
12208
12270
|
* @chrome-returns-extra since Chrome 96
|
|
12271
|
+
* @returns Returns a Promise which resolves with the hardware platform info.
|
|
12209
12272
|
*/
|
|
12210
12273
|
export function getHardwarePlatformInfo(): Promise<HardwarePlatformInfo>;
|
|
12211
12274
|
|
|
@@ -12242,6 +12305,7 @@ declare namespace chrome {
|
|
|
12242
12305
|
* Sets the current input method. This function only changes the current input method to an enabled input method. Input methods can be enabled by enterprise polices. If the input method ID is invalid, or not enabled, {@link runtime.lastError} will be set with a failure reason.
|
|
12243
12306
|
*
|
|
12244
12307
|
* @param options Object containing the fields defined in {@link SetCurrentInputMethodOptions}.
|
|
12308
|
+
* @returns Returns a Promise which resolves when the input method is changed, or rejects if there is an error.
|
|
12245
12309
|
*/
|
|
12246
12310
|
export function setCurrentInputMethod(
|
|
12247
12311
|
|
|
@@ -12317,6 +12381,7 @@ declare namespace chrome {
|
|
|
12317
12381
|
* Retrieves the network details of the device's default network. If the user is not affiliated or the device is not connected to a network, {@link runtime.lastError} will be set with a failure reason.
|
|
12318
12382
|
*
|
|
12319
12383
|
* @chrome-returns-extra since Chrome 96
|
|
12384
|
+
* @returns Returns a Promise which resolves with the device's default network's {@link NetworkDetails}.
|
|
12320
12385
|
*/
|
|
12321
12386
|
export function getNetworkDetails(): Promise<NetworkDetails>;
|
|
12322
12387
|
|
|
@@ -12420,6 +12485,7 @@ declare namespace chrome {
|
|
|
12420
12485
|
* Returns the available Tokens. In a regular user's session the list will always contain the user's token with `id` `"user"`. If a system-wide TPM token is available, the returned list will also contain the system-wide token with `id` `"system"`. The system-wide token will be the same for all sessions on this device (device in the sense of e.g. a Chromebook).
|
|
12421
12486
|
*
|
|
12422
12487
|
* @chrome-returns-extra since Chrome 131
|
|
12488
|
+
* @returns Invoked by `getTokens` with the list of available Tokens.
|
|
12423
12489
|
*/
|
|
12424
12490
|
export function getTokens(): Promise<Token[]>;
|
|
12425
12491
|
|
|
@@ -12441,6 +12507,7 @@ declare namespace chrome {
|
|
|
12441
12507
|
*
|
|
12442
12508
|
* @chrome-returns-extra since Chrome 131
|
|
12443
12509
|
* @param tokenId The id of a Token returned by `getTokens`.
|
|
12510
|
+
* @returns Returns a Promise which resolves with the list of the available certificates.
|
|
12444
12511
|
*/
|
|
12445
12512
|
export function getCertificates(
|
|
12446
12513
|
|
|
@@ -12470,6 +12537,7 @@ declare namespace chrome {
|
|
|
12470
12537
|
* @chrome-returns-extra since Chrome 131
|
|
12471
12538
|
* @param tokenId The id of a Token returned by `getTokens`.
|
|
12472
12539
|
* @param certificate The DER encoding of a X.509 certificate.
|
|
12540
|
+
* @returns Returns a Promise which resolves when this operation is finished.
|
|
12473
12541
|
*/
|
|
12474
12542
|
export function importCertificate(
|
|
12475
12543
|
|
|
@@ -12499,6 +12567,7 @@ declare namespace chrome {
|
|
|
12499
12567
|
* @chrome-returns-extra since Chrome 131
|
|
12500
12568
|
* @param tokenId The id of a Token returned by `getTokens`.
|
|
12501
12569
|
* @param certificate The DER encoding of a X.509 certificate.
|
|
12570
|
+
* @returns Returns a Promise which resolves when this operation is finished.
|
|
12502
12571
|
*/
|
|
12503
12572
|
export function removeCertificate(
|
|
12504
12573
|
|
|
@@ -12531,6 +12600,7 @@ declare namespace chrome {
|
|
|
12531
12600
|
*
|
|
12532
12601
|
* @chrome-returns-extra since Chrome 131
|
|
12533
12602
|
* @param options Object containing the fields defined in {@link ChallengeKeyOptions}.
|
|
12603
|
+
* @returns Returns a Promise which resolves with the challenge response.
|
|
12534
12604
|
* @since Chrome 110
|
|
12535
12605
|
*/
|
|
12536
12606
|
export function challengeKey(
|
|
@@ -12566,6 +12636,7 @@ declare namespace chrome {
|
|
|
12566
12636
|
* @chrome-returns-extra since Chrome 131
|
|
12567
12637
|
* @param challenge A challenge as emitted by the Verified Access Web API.
|
|
12568
12638
|
* @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.
|
|
12639
|
+
* @returns Returns a Promise which resolves with the challenge response.
|
|
12569
12640
|
* @deprecated Use {@link challengeKey} instead.
|
|
12570
12641
|
* @since Chrome 50
|
|
12571
12642
|
* @chrome-deprecated-since Chrome 110
|
|
@@ -12612,6 +12683,7 @@ declare namespace chrome {
|
|
|
12612
12683
|
* @chrome-returns-extra since Chrome 131
|
|
12613
12684
|
* @param challenge A challenge as emitted by the Verified Access Web API.
|
|
12614
12685
|
* @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.
|
|
12686
|
+
* @returns Returns a Promise which resolves with the challenge response.
|
|
12615
12687
|
* @deprecated Use {@link challengeKey} instead.
|
|
12616
12688
|
* @since Chrome 50
|
|
12617
12689
|
* @chrome-deprecated-since Chrome 110
|
|
@@ -14947,6 +15019,7 @@ declare namespace chrome {
|
|
|
14947
15019
|
* In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
|
|
14948
15020
|
*
|
|
14949
15021
|
* @chrome-returns-extra since Chrome 96
|
|
15022
|
+
* @returns A generic result callback to indicate success or failure.
|
|
14950
15023
|
*/
|
|
14951
15024
|
export function mount(
|
|
14952
15025
|
|
|
@@ -14973,6 +15046,7 @@ declare namespace chrome {
|
|
|
14973
15046
|
* In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
|
|
14974
15047
|
*
|
|
14975
15048
|
* @chrome-returns-extra since Chrome 96
|
|
15049
|
+
* @returns A generic result callback to indicate success or failure.
|
|
14976
15050
|
*/
|
|
14977
15051
|
export function unmount(
|
|
14978
15052
|
|
|
@@ -14995,6 +15069,7 @@ declare namespace chrome {
|
|
|
14995
15069
|
* Returns all file systems mounted by the extension.
|
|
14996
15070
|
*
|
|
14997
15071
|
* @chrome-returns-extra since Chrome 96
|
|
15072
|
+
* @returns Callback to receive the result of {@link getAll} function.
|
|
14998
15073
|
*/
|
|
14999
15074
|
export function getAll(): Promise<FileSystemInfo[]>;
|
|
15000
15075
|
|
|
@@ -15012,6 +15087,7 @@ declare namespace chrome {
|
|
|
15012
15087
|
* Returns information about a file system with the passed `fileSystemId`.
|
|
15013
15088
|
*
|
|
15014
15089
|
* @chrome-returns-extra since Chrome 96
|
|
15090
|
+
* @returns Callback to receive the result of {@link get} function.
|
|
15015
15091
|
*/
|
|
15016
15092
|
export function get(
|
|
15017
15093
|
|
|
@@ -15044,6 +15120,7 @@ declare namespace chrome {
|
|
|
15044
15120
|
* In case of an error, {@link runtime.lastError} will be set will a corresponding error code.
|
|
15045
15121
|
*
|
|
15046
15122
|
* @chrome-returns-extra since Chrome 96
|
|
15123
|
+
* @returns A generic result callback to indicate success or failure.
|
|
15047
15124
|
* @since Chrome 45
|
|
15048
15125
|
*/
|
|
15049
15126
|
export function notify(
|
|
@@ -15750,6 +15827,7 @@ declare namespace chrome {
|
|
|
15750
15827
|
*
|
|
15751
15828
|
* @chrome-returns-extra since Chrome 116
|
|
15752
15829
|
* @param senderIds A list of server IDs that are allowed to send messages to the application. It should contain at least one and no more than 100 sender IDs.
|
|
15830
|
+
* @returns Resolves when registration completes.
|
|
15753
15831
|
*/
|
|
15754
15832
|
export function register(
|
|
15755
15833
|
|
|
@@ -15777,6 +15855,7 @@ declare namespace chrome {
|
|
|
15777
15855
|
* Unregisters the application from FCM.
|
|
15778
15856
|
*
|
|
15779
15857
|
* @chrome-returns-extra since Chrome 116
|
|
15858
|
+
* @returns Resolves after the unregistration completes. Unregistration was successful if the promise does not reject.
|
|
15780
15859
|
*/
|
|
15781
15860
|
export function unregister(): Promise<void>;
|
|
15782
15861
|
|
|
@@ -15793,6 +15872,7 @@ declare namespace chrome {
|
|
|
15793
15872
|
*
|
|
15794
15873
|
* @chrome-returns-extra since Chrome 116
|
|
15795
15874
|
* @param message A message to send to the other party via FCM.
|
|
15875
|
+
* @returns Resolves after the message is successfully queued for sending. If an error occurs, the promise will be rejected.
|
|
15796
15876
|
*/
|
|
15797
15877
|
export function send(
|
|
15798
15878
|
|
|
@@ -16839,6 +16919,7 @@ declare namespace chrome {
|
|
|
16839
16919
|
*
|
|
16840
16920
|
* @chrome-returns-extra since Chrome 105
|
|
16841
16921
|
* @param details Token options.
|
|
16922
|
+
* @returns Returns a Promise which resolves with an OAuth2 access token as specified by the manifest, or rejects if there was an error. The `grantedScopes` parameter is populated since Chrome 87. When available, this parameter contains the list of granted scopes corresponding with the returned token.
|
|
16842
16923
|
*/
|
|
16843
16924
|
export function getAuthToken(
|
|
16844
16925
|
|
|
@@ -16877,6 +16958,7 @@ declare namespace chrome {
|
|
|
16877
16958
|
*
|
|
16878
16959
|
* @chrome-returns-extra since Chrome 106
|
|
16879
16960
|
* @param details Profile options.
|
|
16961
|
+
* @returns Returns a Promise which resolves with the `ProfileUserInfo` of the primary Chrome account, or an empty `ProfileUserInfo` if the account with given `details` doesn't exist.
|
|
16880
16962
|
*/
|
|
16881
16963
|
export function getProfileUserInfo(
|
|
16882
16964
|
|
|
@@ -16914,6 +16996,7 @@ declare namespace chrome {
|
|
|
16914
16996
|
*
|
|
16915
16997
|
* @chrome-returns-extra since Chrome 106
|
|
16916
16998
|
* @param details Token information.
|
|
16999
|
+
* @returns Returns a Promise which resolves when the token has been removed from the cache.
|
|
16917
17000
|
*/
|
|
16918
17001
|
export function removeCachedAuthToken(
|
|
16919
17002
|
|
|
@@ -16942,6 +17025,7 @@ declare namespace chrome {
|
|
|
16942
17025
|
* * De-authorizes the user from all auth flows
|
|
16943
17026
|
*
|
|
16944
17027
|
* @chrome-returns-extra since Chrome 106
|
|
17028
|
+
* @returns Returns a Promise which resolves when the state has been cleared.
|
|
16945
17029
|
* @since Chrome 87
|
|
16946
17030
|
*/
|
|
16947
17031
|
export function clearAllCachedAuthTokens(): Promise<void>;
|
|
@@ -16969,6 +17053,7 @@ declare namespace chrome {
|
|
|
16969
17053
|
*
|
|
16970
17054
|
* @chrome-returns-extra since Chrome 106
|
|
16971
17055
|
* @param details WebAuth flow options.
|
|
17056
|
+
* @returns Returns a Promise which resolves with the URL redirected back to your application.
|
|
16972
17057
|
*/
|
|
16973
17058
|
export function launchWebAuthFlow(
|
|
16974
17059
|
|
|
@@ -17485,6 +17570,7 @@ declare namespace chrome {
|
|
|
17485
17570
|
* Set the current composition. If this extension does not own the active IME, this fails.
|
|
17486
17571
|
*
|
|
17487
17572
|
* @chrome-returns-extra since Chrome 111
|
|
17573
|
+
* @returns Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
|
|
17488
17574
|
*/
|
|
17489
17575
|
export function setComposition(
|
|
17490
17576
|
|
|
@@ -17601,6 +17687,7 @@ declare namespace chrome {
|
|
|
17601
17687
|
* Clear the current composition. If this extension does not own the active IME, this fails.
|
|
17602
17688
|
*
|
|
17603
17689
|
* @chrome-returns-extra since Chrome 111
|
|
17690
|
+
* @returns Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
|
|
17604
17691
|
*/
|
|
17605
17692
|
export function clearComposition(
|
|
17606
17693
|
|
|
@@ -17635,6 +17722,7 @@ declare namespace chrome {
|
|
|
17635
17722
|
* Commits the provided text to the current input.
|
|
17636
17723
|
*
|
|
17637
17724
|
* @chrome-returns-extra since Chrome 111
|
|
17725
|
+
* @returns Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
|
|
17638
17726
|
*/
|
|
17639
17727
|
export function commitText(
|
|
17640
17728
|
|
|
@@ -17679,6 +17767,7 @@ declare namespace chrome {
|
|
|
17679
17767
|
* 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.
|
|
17680
17768
|
*
|
|
17681
17769
|
* @chrome-returns-extra since Chrome 111
|
|
17770
|
+
* @returns Resolves when the operation completes.
|
|
17682
17771
|
*/
|
|
17683
17772
|
export function sendKeyEvents(
|
|
17684
17773
|
|
|
@@ -17726,6 +17815,7 @@ declare namespace chrome {
|
|
|
17726
17815
|
* Sets the properties of the candidate window. This fails if the extension doesn't own the active IME
|
|
17727
17816
|
*
|
|
17728
17817
|
* @chrome-returns-extra since Chrome 111
|
|
17818
|
+
* @returns Resolves when the operation completes.
|
|
17729
17819
|
*/
|
|
17730
17820
|
export function setCandidateWindowProperties(
|
|
17731
17821
|
|
|
@@ -17864,6 +17954,7 @@ declare namespace chrome {
|
|
|
17864
17954
|
* Sets the current candidate list. This fails if this extension doesn't own the active IME
|
|
17865
17955
|
*
|
|
17866
17956
|
* @chrome-returns-extra since Chrome 111
|
|
17957
|
+
* @returns Resolves when the operation completes.
|
|
17867
17958
|
*/
|
|
17868
17959
|
export function setCandidates(
|
|
17869
17960
|
|
|
@@ -17992,6 +18083,7 @@ declare namespace chrome {
|
|
|
17992
18083
|
* Set the position of the cursor in the candidate window. This is a no-op if this extension does not own the active IME.
|
|
17993
18084
|
*
|
|
17994
18085
|
* @chrome-returns-extra since Chrome 111
|
|
18086
|
+
* @returns Resolves when the operation completes
|
|
17995
18087
|
*/
|
|
17996
18088
|
export function setCursorPosition(
|
|
17997
18089
|
|
|
@@ -18036,6 +18128,7 @@ declare namespace chrome {
|
|
|
18036
18128
|
* Shows/Hides an assistive window with the given properties.
|
|
18037
18129
|
*
|
|
18038
18130
|
* @chrome-returns-extra since Chrome 111
|
|
18131
|
+
* @returns Resolves when the operation completes.
|
|
18039
18132
|
* @since Chrome 85
|
|
18040
18133
|
*/
|
|
18041
18134
|
export function setAssistiveWindowProperties(
|
|
@@ -18083,6 +18176,7 @@ declare namespace chrome {
|
|
|
18083
18176
|
* Highlights/Unhighlights a button in an assistive window.
|
|
18084
18177
|
*
|
|
18085
18178
|
* @chrome-returns-extra since Chrome 111
|
|
18179
|
+
* @returns Resolves when the operation completes. On failure, the promise will be rejected.
|
|
18086
18180
|
* @since Chrome 86
|
|
18087
18181
|
*/
|
|
18088
18182
|
export function setAssistiveWindowButtonHighlighted(
|
|
@@ -18178,6 +18272,7 @@ declare namespace chrome {
|
|
|
18178
18272
|
* Updates the state of the MenuItems specified
|
|
18179
18273
|
*
|
|
18180
18274
|
* @chrome-returns-extra since Chrome 111
|
|
18275
|
+
* @returns Resolves when the operation completes
|
|
18181
18276
|
*/
|
|
18182
18277
|
export function updateMenuItems(
|
|
18183
18278
|
|
|
@@ -18198,6 +18293,7 @@ declare namespace chrome {
|
|
|
18198
18293
|
* Deletes the text around the caret.
|
|
18199
18294
|
*
|
|
18200
18295
|
* @chrome-returns-extra since Chrome 111
|
|
18296
|
+
* @returns Resolves when the operation completes.
|
|
18201
18297
|
*/
|
|
18202
18298
|
export function deleteSurroundingText(
|
|
18203
18299
|
|
|
@@ -18287,6 +18383,7 @@ declare namespace chrome {
|
|
|
18287
18383
|
* Retrieves an identifier for the app instance. The instance ID will be returned by the `callback`. The same ID will be returned as long as the application identity has not been revoked or expired.
|
|
18288
18384
|
*
|
|
18289
18385
|
* @chrome-returns-extra since Chrome 96
|
|
18386
|
+
* @returns Resolves when the retrieval completes.
|
|
18290
18387
|
*/
|
|
18291
18388
|
export function getID(): Promise<string>;
|
|
18292
18389
|
|
|
@@ -18307,6 +18404,7 @@ declare namespace chrome {
|
|
|
18307
18404
|
* Retrieves the time when the InstanceID has been generated. The creation time will be returned by the `callback`.
|
|
18308
18405
|
*
|
|
18309
18406
|
* @chrome-returns-extra since Chrome 96
|
|
18407
|
+
* @returns Resolves when the retrieval completes.
|
|
18310
18408
|
*/
|
|
18311
18409
|
export function getCreationTime(): Promise<number>;
|
|
18312
18410
|
|
|
@@ -18328,6 +18426,7 @@ declare namespace chrome {
|
|
|
18328
18426
|
*
|
|
18329
18427
|
* @chrome-returns-extra since Chrome 96
|
|
18330
18428
|
* @param getTokenParams Parameters for getToken.
|
|
18429
|
+
* @returns Resolves when the retrieval completes.
|
|
18331
18430
|
*/
|
|
18332
18431
|
export function getToken(
|
|
18333
18432
|
|
|
@@ -18404,6 +18503,7 @@ declare namespace chrome {
|
|
|
18404
18503
|
*
|
|
18405
18504
|
* @chrome-returns-extra since Chrome 96
|
|
18406
18505
|
* @param deleteTokenParams Parameters for deleteToken.
|
|
18506
|
+
* @returns Resolves when the token deletion completes. The token was revoked successfully if the promise does not reject.
|
|
18407
18507
|
*/
|
|
18408
18508
|
export function deleteToken(
|
|
18409
18509
|
|
|
@@ -18456,6 +18556,7 @@ declare namespace chrome {
|
|
|
18456
18556
|
* Resets the app instance identifier and revokes all tokens associated with it.
|
|
18457
18557
|
*
|
|
18458
18558
|
* @chrome-returns-extra since Chrome 96
|
|
18559
|
+
* @returns Resolves when the deletion completes. The instance identifier was revoked successfully if the promise does not reject.
|
|
18459
18560
|
*/
|
|
18460
18561
|
export function deleteID(): Promise<void>;
|
|
18461
18562
|
|
|
@@ -21751,6 +21852,7 @@ declare namespace chrome {
|
|
|
21751
21852
|
|
|
21752
21853
|
The `notificationId` parameter is required before Chrome 42.
|
|
21753
21854
|
* @param options Contents of the notification.
|
|
21855
|
+
* @returns Returns a Promise which resolves with the notification id (either supplied or generated) that represents the created notification.
|
|
21754
21856
|
*/
|
|
21755
21857
|
export function create(
|
|
21756
21858
|
|
|
@@ -21764,6 +21866,7 @@ declare namespace chrome {
|
|
|
21764
21866
|
*
|
|
21765
21867
|
* @chrome-returns-extra since Chrome 116
|
|
21766
21868
|
* @param options Contents of the notification.
|
|
21869
|
+
* @returns Returns a Promise which resolves with the notification id (either supplied or generated) that represents the created notification.
|
|
21767
21870
|
*/
|
|
21768
21871
|
export function create(
|
|
21769
21872
|
|
|
@@ -21811,6 +21914,7 @@ declare namespace chrome {
|
|
|
21811
21914
|
* @chrome-returns-extra since Chrome 116
|
|
21812
21915
|
* @param notificationId The id of the notification to be updated. This is returned by {@link notifications.create} method.
|
|
21813
21916
|
* @param options Contents of the notification to update to.
|
|
21917
|
+
* @returns Returns a Promise which resolves to indicate whether a matching notification existed.
|
|
21814
21918
|
*/
|
|
21815
21919
|
export function update(
|
|
21816
21920
|
|
|
@@ -21841,6 +21945,7 @@ declare namespace chrome {
|
|
|
21841
21945
|
*
|
|
21842
21946
|
* @chrome-returns-extra since Chrome 116
|
|
21843
21947
|
* @param notificationId The id of the notification to be cleared. This is returned by {@link notifications.create} method.
|
|
21948
|
+
* @returns Returns a Promise which resolves to indicate whether a matching notification existed.
|
|
21844
21949
|
*/
|
|
21845
21950
|
export function clear(
|
|
21846
21951
|
|
|
@@ -21865,6 +21970,7 @@ declare namespace chrome {
|
|
|
21865
21970
|
* Retrieves all the notifications of this app or extension.
|
|
21866
21971
|
*
|
|
21867
21972
|
* @chrome-returns-extra since Chrome 116
|
|
21973
|
+
* @returns Returns a Promise which resolves with the set of notification\_ids currently in the system.
|
|
21868
21974
|
*/
|
|
21869
21975
|
export function getAll(): Promise<{[name: string]: any}>;
|
|
21870
21976
|
|
|
@@ -21882,6 +21988,7 @@ declare namespace chrome {
|
|
|
21882
21988
|
* Retrieves whether the user has enabled notifications from this app or extension.
|
|
21883
21989
|
*
|
|
21884
21990
|
* @chrome-returns-extra since Chrome 116
|
|
21991
|
+
* @returns Returns a Promise which resolves with the current permission level.
|
|
21885
21992
|
*/
|
|
21886
21993
|
export function getPermissionLevel(): Promise<PermissionLevel>;
|
|
21887
21994
|
|
|
@@ -21967,6 +22074,7 @@ declare namespace chrome {
|
|
|
21967
22074
|
* Creates a new offscreen document for the extension.
|
|
21968
22075
|
*
|
|
21969
22076
|
* @param parameters The parameters describing the offscreen document to create.
|
|
22077
|
+
* @returns Promise that resolves when the offscreen document is created and has completed its initial page load.
|
|
21970
22078
|
*/
|
|
21971
22079
|
export function createDocument(
|
|
21972
22080
|
|
|
@@ -21987,6 +22095,8 @@ declare namespace chrome {
|
|
|
21987
22095
|
|
|
21988
22096
|
/**
|
|
21989
22097
|
* Closes the currently-open offscreen document for the extension.
|
|
22098
|
+
*
|
|
22099
|
+
* @returns Promise that resolves when the offscreen document has been closed.
|
|
21990
22100
|
*/
|
|
21991
22101
|
export function closeDocument(): Promise<void>;
|
|
21992
22102
|
|
|
@@ -22412,6 +22522,7 @@ declare namespace chrome {
|
|
|
22412
22522
|
* Saves the content of the tab with given id as MHTML.
|
|
22413
22523
|
*
|
|
22414
22524
|
* @chrome-returns-extra since Chrome 116
|
|
22525
|
+
* @returns Resolves when the MHTML has been generated.
|
|
22415
22526
|
*/
|
|
22416
22527
|
export function saveAsMHTML(
|
|
22417
22528
|
|
|
@@ -23803,6 +23914,7 @@ declare namespace chrome {
|
|
|
23803
23914
|
* Returns the ID of the renderer process for the specified tab.
|
|
23804
23915
|
*
|
|
23805
23916
|
* @param tabId The ID of the tab for which the renderer process ID is to be returned.
|
|
23917
|
+
* @returns A callback to return the ID of the renderer process of a tab.
|
|
23806
23918
|
*/
|
|
23807
23919
|
export function getProcessIdForTab(
|
|
23808
23920
|
|
|
@@ -23830,6 +23942,7 @@ declare namespace chrome {
|
|
|
23830
23942
|
* Terminates the specified renderer process. Equivalent to visiting about:crash, but without changing the tab's URL.
|
|
23831
23943
|
*
|
|
23832
23944
|
* @param processId The ID of the process to be terminated.
|
|
23945
|
+
* @returns A callback to report the status of the termination.
|
|
23833
23946
|
*/
|
|
23834
23947
|
export function terminate(
|
|
23835
23948
|
|
|
@@ -23858,6 +23971,7 @@ declare namespace chrome {
|
|
|
23858
23971
|
*
|
|
23859
23972
|
* @param processIds The list of process IDs or single process ID for which to return the process information. An empty list indicates all processes are requested.
|
|
23860
23973
|
* @param includeMemory True if detailed memory usage is required. Note, collecting memory usage information incurs extra CPU usage and should only be queried for when needed.
|
|
23974
|
+
* @returns A callback called when the processes information is collected.
|
|
23861
23975
|
*/
|
|
23862
23976
|
export function getProcessInfo(
|
|
23863
23977
|
|
|
@@ -24186,6 +24300,7 @@ declare namespace chrome {
|
|
|
24186
24300
|
* Adds an entry to the reading list if it does not exist.
|
|
24187
24301
|
*
|
|
24188
24302
|
* @param entry The entry to add to the reading list.
|
|
24303
|
+
* @returns Resolves once the entry has been added.
|
|
24189
24304
|
*/
|
|
24190
24305
|
export function addEntry(
|
|
24191
24306
|
|
|
@@ -24208,6 +24323,7 @@ declare namespace chrome {
|
|
|
24208
24323
|
* Removes an entry from the reading list if it exists.
|
|
24209
24324
|
*
|
|
24210
24325
|
* @param info The entry to remove from the reading list.
|
|
24326
|
+
* @returns Resolves once the entry has been removed.
|
|
24211
24327
|
*/
|
|
24212
24328
|
export function removeEntry(
|
|
24213
24329
|
|
|
@@ -24230,6 +24346,7 @@ declare namespace chrome {
|
|
|
24230
24346
|
* Updates a reading list entry if it exists.
|
|
24231
24347
|
*
|
|
24232
24348
|
* @param info The entry to update.
|
|
24349
|
+
* @returns Resolves once the matched entries have been updated.
|
|
24233
24350
|
*/
|
|
24234
24351
|
export function updateEntry(
|
|
24235
24352
|
|
|
@@ -24252,6 +24369,7 @@ declare namespace chrome {
|
|
|
24252
24369
|
* Retrieves all entries that match the `QueryInfo` properties. Properties that are not provided will not be matched.
|
|
24253
24370
|
*
|
|
24254
24371
|
* @param info The properties to search for.
|
|
24372
|
+
* @returns Resolves once the entries have been matched.
|
|
24255
24373
|
*/
|
|
24256
24374
|
export function query(
|
|
24257
24375
|
|
|
@@ -25382,6 +25500,7 @@ declare namespace chrome {
|
|
|
25382
25500
|
*
|
|
25383
25501
|
* @chrome-returns-extra since Chrome 90
|
|
25384
25502
|
* @param injection The details of the script which to inject.
|
|
25503
|
+
* @returns Returns a Promise which resolves upon completion of the injection. The resulting array contains the result of execution for each frame where the injection succeeded.
|
|
25385
25504
|
*/
|
|
25386
25505
|
export function executeScript(
|
|
25387
25506
|
|
|
@@ -25407,6 +25526,7 @@ declare namespace chrome {
|
|
|
25407
25526
|
*
|
|
25408
25527
|
* @chrome-returns-extra since Chrome 90
|
|
25409
25528
|
* @param injection The details of the styles to insert.
|
|
25529
|
+
* @returns Returns a Promise which resolves upon completion of the insertion.
|
|
25410
25530
|
*/
|
|
25411
25531
|
export function insertCSS(
|
|
25412
25532
|
|
|
@@ -25429,6 +25549,7 @@ declare namespace chrome {
|
|
|
25429
25549
|
* Removes a CSS stylesheet that was previously inserted by this extension from a target context.
|
|
25430
25550
|
*
|
|
25431
25551
|
* @param injection The details of the styles to remove. Note that the `css`, `files`, and `origin` properties must exactly match the stylesheet inserted through {@link insertCSS}. Attempting to remove a non-existent stylesheet is a no-op.
|
|
25552
|
+
* @returns Returns a Promise which resolves upon the completion of the removal.
|
|
25432
25553
|
* @since Chrome 90
|
|
25433
25554
|
*/
|
|
25434
25555
|
export function removeCSS(
|
|
@@ -25453,6 +25574,7 @@ declare namespace chrome {
|
|
|
25453
25574
|
* Registers one or more content scripts for this extension.
|
|
25454
25575
|
*
|
|
25455
25576
|
* @param scripts Contains a list of scripts to be registered. If there are errors during script parsing/file validation, or if the IDs specified already exist, then no scripts are registered.
|
|
25577
|
+
* @returns Returns a Promise which resolves once scripts have been fully registered or rejects if an error has occurred.
|
|
25456
25578
|
* @since Chrome 96
|
|
25457
25579
|
*/
|
|
25458
25580
|
export function registerContentScripts(
|
|
@@ -25503,6 +25625,7 @@ declare namespace chrome {
|
|
|
25503
25625
|
* Unregisters content scripts for this extension.
|
|
25504
25626
|
*
|
|
25505
25627
|
* @param filter If specified, only unregisters dynamic content scripts which match the filter. Otherwise, all of the extension's dynamic content scripts are unregistered.
|
|
25628
|
+
* @returns Returns a Promise which resolves once scripts have been unregistered or rejects if an error has occurred.
|
|
25506
25629
|
* @since Chrome 96
|
|
25507
25630
|
*/
|
|
25508
25631
|
export function unregisterContentScripts(
|
|
@@ -25527,6 +25650,7 @@ declare namespace chrome {
|
|
|
25527
25650
|
* Updates one or more content scripts for this extension.
|
|
25528
25651
|
*
|
|
25529
25652
|
* @param scripts Contains a list of scripts to be updated. A property is only updated for the existing script if it is specified in this object. If there are errors during script parsing/file validation, or if the IDs specified do not correspond to a fully registered script, then no scripts are updated.
|
|
25653
|
+
* @returns Returns a Promise which resolves once scripts have been updated or rejects if an error has occurred.
|
|
25530
25654
|
* @since Chrome 96
|
|
25531
25655
|
*/
|
|
25532
25656
|
export function updateContentScripts(
|
|
@@ -26538,6 +26662,7 @@ declare namespace chrome {
|
|
|
26538
26662
|
* Configures the side panel.
|
|
26539
26663
|
*
|
|
26540
26664
|
* @param options The configuration options to apply to the panel.
|
|
26665
|
+
* @returns Returns a Promise which resolves when the options have been set.
|
|
26541
26666
|
*/
|
|
26542
26667
|
export function setOptions(
|
|
26543
26668
|
|
|
@@ -26560,6 +26685,7 @@ declare namespace chrome {
|
|
|
26560
26685
|
* Returns the active panel configuration.
|
|
26561
26686
|
*
|
|
26562
26687
|
* @param options Specifies the context to return the configuration for.
|
|
26688
|
+
* @returns Returns a Promise which resolves with the active panel configuration.
|
|
26563
26689
|
*/
|
|
26564
26690
|
export function getOptions(
|
|
26565
26691
|
|
|
@@ -26584,6 +26710,7 @@ declare namespace chrome {
|
|
|
26584
26710
|
* Configures the extension's side panel behavior. This is an upsert operation.
|
|
26585
26711
|
*
|
|
26586
26712
|
* @param behavior The new behavior to be set.
|
|
26713
|
+
* @returns Returns a Promise which resolves when the new behavior has been set.
|
|
26587
26714
|
*/
|
|
26588
26715
|
export function setPanelBehavior(
|
|
26589
26716
|
|
|
@@ -26604,6 +26731,8 @@ declare namespace chrome {
|
|
|
26604
26731
|
|
|
26605
26732
|
/**
|
|
26606
26733
|
* Returns the extension's current side panel behavior.
|
|
26734
|
+
*
|
|
26735
|
+
* @returns Returns a Promise which resolves with the extension's side panel behavior.
|
|
26607
26736
|
*/
|
|
26608
26737
|
export function getPanelBehavior(): Promise<PanelBehavior>;
|
|
26609
26738
|
|
|
@@ -26621,6 +26750,7 @@ declare namespace chrome {
|
|
|
26621
26750
|
* Opens the side panel for the extension. This may only be called in response to a user action.
|
|
26622
26751
|
*
|
|
26623
26752
|
* @param options Specifies the context in which to open the side panel.
|
|
26753
|
+
* @returns Returns a Promise which resolves when the side panel has been opened.
|
|
26624
26754
|
* @since Chrome 116
|
|
26625
26755
|
*/
|
|
26626
26756
|
export function open(
|
|
@@ -26644,6 +26774,7 @@ declare namespace chrome {
|
|
|
26644
26774
|
/**
|
|
26645
26775
|
* Returns the side panel's current layout.
|
|
26646
26776
|
*
|
|
26777
|
+
* @returns Returns a Promise which resolves with a {@link PanelLayout}.
|
|
26647
26778
|
* @since Chrome 140
|
|
26648
26779
|
*/
|
|
26649
26780
|
export function getLayout(): Promise<PanelLayout>;
|
|
@@ -28718,6 +28849,7 @@ declare namespace chrome {
|
|
|
28718
28849
|
*
|
|
28719
28850
|
* @chrome-returns-extra since Chrome 95
|
|
28720
28851
|
* @param keys A single key to get, list of keys to get, or a dictionary specifying default values (see description of the object). An empty list or object will return an empty result object. Pass in `null` to get the entire contents of storage.
|
|
28852
|
+
* @returns Promise that resolves with storage items, or rejects on failure.
|
|
28721
28853
|
*/
|
|
28722
28854
|
get(
|
|
28723
28855
|
|
|
@@ -28744,6 +28876,7 @@ declare namespace chrome {
|
|
|
28744
28876
|
/**
|
|
28745
28877
|
* Gets all keys from storage.
|
|
28746
28878
|
*
|
|
28879
|
+
* @returns Promise that resolves with storage keys, or rejects on failure.
|
|
28747
28880
|
* @since Chrome 130
|
|
28748
28881
|
*/
|
|
28749
28882
|
getKeys(): Promise<string[]>;
|
|
@@ -28768,6 +28901,7 @@ declare namespace chrome {
|
|
|
28768
28901
|
*
|
|
28769
28902
|
* @chrome-returns-extra since Chrome 95
|
|
28770
28903
|
* @param keys A single key or list of keys to get the total usage for. An empty list will return 0. Pass in `null` to get the total usage of all of storage.
|
|
28904
|
+
* @returns Promise that resolves with the amount of space being used by storage, or rejects on failure.
|
|
28771
28905
|
*/
|
|
28772
28906
|
getBytesInUse(
|
|
28773
28907
|
|
|
@@ -28800,6 +28934,7 @@ declare namespace chrome {
|
|
|
28800
28934
|
An object which gives each key/value pair to update storage with. Any other key/value pairs in storage will not be affected.
|
|
28801
28935
|
|
|
28802
28936
|
Primitive values such as numbers will serialize as expected. Values with a `typeof` `"object"` and `"function"` will typically serialize to `{}`, with the exception of `Array` (serializes as expected), `Date`, and `Regex` (serialize using their `String` representation).
|
|
28937
|
+
* @returns Promise that resolves on success, or rejects on failure.
|
|
28803
28938
|
*/
|
|
28804
28939
|
set(
|
|
28805
28940
|
|
|
@@ -28827,6 +28962,7 @@ declare namespace chrome {
|
|
|
28827
28962
|
*
|
|
28828
28963
|
* @chrome-returns-extra since Chrome 95
|
|
28829
28964
|
* @param keys A single key or a list of keys for items to remove.
|
|
28965
|
+
* @returns Promise that resolves on success, or rejects on failure.
|
|
28830
28966
|
*/
|
|
28831
28967
|
remove(
|
|
28832
28968
|
|
|
@@ -28849,6 +28985,7 @@ declare namespace chrome {
|
|
|
28849
28985
|
* Removes all items from storage.
|
|
28850
28986
|
*
|
|
28851
28987
|
* @chrome-returns-extra since Chrome 95
|
|
28988
|
+
* @returns Promise that resolves on success, or rejects on failure.
|
|
28852
28989
|
*/
|
|
28853
28990
|
clear(): Promise<void>;
|
|
28854
28991
|
|
|
@@ -28863,6 +29000,7 @@ declare namespace chrome {
|
|
|
28863
29000
|
/**
|
|
28864
29001
|
* Sets the desired access level for the storage area. By default, `session` storage is restricted to trusted contexts (extension pages and service workers), while `managed`, `local`, and `sync` storage allow access from both trusted and untrusted contexts.
|
|
28865
29002
|
*
|
|
29003
|
+
* @returns Promise that resolves on success, or rejects on failure.
|
|
28866
29004
|
* @since Chrome 102
|
|
28867
29005
|
*/
|
|
28868
29006
|
setAccessLevel(
|
|
@@ -29774,6 +29912,7 @@ declare namespace chrome {
|
|
|
29774
29912
|
*
|
|
29775
29913
|
* @chrome-returns-extra since Chrome 91
|
|
29776
29914
|
* @param flags Options affecting how the information is returned.
|
|
29915
|
+
* @returns Promise that resolves with the results.
|
|
29777
29916
|
*/
|
|
29778
29917
|
export function getInfo(
|
|
29779
29918
|
|
|
@@ -29804,6 +29943,7 @@ declare namespace chrome {
|
|
|
29804
29943
|
* Requests the layout info for all displays. NOTE: This is only available to ChromeOS Kiosk apps and Web UI.
|
|
29805
29944
|
*
|
|
29806
29945
|
* @chrome-returns-extra since Chrome 91
|
|
29946
|
+
* @returns Promise that resolves with the results.
|
|
29807
29947
|
* @since Chrome 53
|
|
29808
29948
|
*/
|
|
29809
29949
|
export function getDisplayLayout(): Promise<DisplayLayout[]>;
|
|
@@ -29826,6 +29966,7 @@ declare namespace chrome {
|
|
|
29826
29966
|
* @chrome-returns-extra since Chrome 91
|
|
29827
29967
|
* @param id The display's unique identifier.
|
|
29828
29968
|
* @param info The information about display properties that should be changed. A property will be changed only if a new value for it is specified in `info`.
|
|
29969
|
+
* @returns Promise that resolves when the function finishes.
|
|
29829
29970
|
*/
|
|
29830
29971
|
export function setDisplayProperties(
|
|
29831
29972
|
|
|
@@ -29854,6 +29995,7 @@ declare namespace chrome {
|
|
|
29854
29995
|
*
|
|
29855
29996
|
* @chrome-returns-extra since Chrome 91
|
|
29856
29997
|
* @param layouts The layout information, required for all displays except the primary display.
|
|
29998
|
+
* @returns Promise that resolves when the function finishes.
|
|
29857
29999
|
* @since Chrome 53
|
|
29858
30000
|
*/
|
|
29859
30001
|
export function setDisplayLayout(
|
|
@@ -29937,6 +30079,7 @@ declare namespace chrome {
|
|
|
29937
30079
|
*
|
|
29938
30080
|
* @chrome-returns-extra since Chrome 91
|
|
29939
30081
|
* @param id The display's unique identifier.
|
|
30082
|
+
* @returns Promise that resolves to inform the caller that the touch calibration has ended. The boolean value informs if the calibration was a success or not.
|
|
29940
30083
|
* @since Chrome 57
|
|
29941
30084
|
*/
|
|
29942
30085
|
export function showNativeTouchCalibration(
|
|
@@ -30000,6 +30143,7 @@ declare namespace chrome {
|
|
|
30000
30143
|
*
|
|
30001
30144
|
* @chrome-returns-extra since Chrome 91
|
|
30002
30145
|
* @param info The information of the mirror mode that should be applied to the display mode.
|
|
30146
|
+
* @returns Promise that resolves when the function finishes.
|
|
30003
30147
|
* @since Chrome 65
|
|
30004
30148
|
*/
|
|
30005
30149
|
export function setMirrorMode(
|
|
@@ -30267,6 +30411,7 @@ declare namespace chrome {
|
|
|
30267
30411
|
* Adds a new log record.
|
|
30268
30412
|
*
|
|
30269
30413
|
* @param options The logging options.
|
|
30414
|
+
* @returns Returns a Promise which resolves once the log has been added.
|
|
30270
30415
|
*/
|
|
30271
30416
|
export function add(
|
|
30272
30417
|
|
|
@@ -30374,6 +30519,7 @@ declare namespace chrome {
|
|
|
30374
30519
|
* Returns a list of tabs that have requested capture or are being captured, i.e. status != stopped and status != error. This allows extensions to inform the user that there is an existing tab capture that would prevent a new tab capture from succeeding (or to prevent redundant requests for the same tab).
|
|
30375
30520
|
*
|
|
30376
30521
|
* @chrome-returns-extra since Chrome 116
|
|
30522
|
+
* @returns Returns a Promise which resolves with CaptureInfo\[\] for captured tabs.
|
|
30377
30523
|
*/
|
|
30378
30524
|
export function getCapturedTabs(): Promise<CaptureInfo[]>;
|
|
30379
30525
|
|
|
@@ -30391,6 +30537,7 @@ declare namespace chrome {
|
|
|
30391
30537
|
* Creates a stream ID to capture the target tab. Similar to chrome.tabCapture.capture() method, but returns a media stream ID, instead of a media stream, to the consumer tab.
|
|
30392
30538
|
*
|
|
30393
30539
|
* @chrome-returns-extra since Chrome 116
|
|
30540
|
+
* @returns Returns a Promise which resolves with the result. If successful, the result is an opaque string that can be passed to the `getUserMedia()` API to generate a media stream that corresponds to the target tab. The created `streamId` can only be used once and expires after a few seconds if it is not used.
|
|
30394
30541
|
* @since Chrome 71
|
|
30395
30542
|
*/
|
|
30396
30543
|
export function getMediaStreamId(
|
|
@@ -33071,6 +33218,7 @@ declare namespace chrome {
|
|
|
33071
33218
|
* @chrome-returns-extra since Chrome 101
|
|
33072
33219
|
* @param utterance The text to speak, either plain text or a complete, well-formed SSML document. Speech engines that do not support SSML will strip away the tags and speak the text. The maximum length of the text is 32,768 characters.
|
|
33073
33220
|
* @param options The speech options.
|
|
33221
|
+
* @returns Resolves right away, before speech finishes. If an error occurs, the promise will be rejected. Use options.onEvent to get more detailed feedback.
|
|
33074
33222
|
*/
|
|
33075
33223
|
export function speak(
|
|
33076
33224
|
|
|
@@ -34785,6 +34933,7 @@ declare namespace chrome {
|
|
|
34785
34933
|
* Registers one or more user scripts for this extension.
|
|
34786
34934
|
*
|
|
34787
34935
|
* @param scripts Contains a list of user scripts to be registered.
|
|
34936
|
+
* @returns Promise that resolves once scripts have been fully registered. The promise will be rejected if an error occurs.
|
|
34788
34937
|
*/
|
|
34789
34938
|
export function register(
|
|
34790
34939
|
|
|
@@ -34807,6 +34956,7 @@ declare namespace chrome {
|
|
|
34807
34956
|
* Returns all dynamically-registered user scripts for this extension.
|
|
34808
34957
|
*
|
|
34809
34958
|
* @param filter If specified, this method returns only the user scripts that match it.
|
|
34959
|
+
* @returns Promise that resolves with the registered scripts. The promise will be rejected if an error occurs.
|
|
34810
34960
|
*/
|
|
34811
34961
|
export function getScripts(
|
|
34812
34962
|
|
|
@@ -34831,6 +34981,7 @@ declare namespace chrome {
|
|
|
34831
34981
|
* Unregisters all dynamically-registered user scripts for this extension.
|
|
34832
34982
|
*
|
|
34833
34983
|
* @param filter If specified, this method unregisters only the user scripts that match it.
|
|
34984
|
+
* @returns Promise that resolves once scripts have been fully unregistered. The promise will be rejected if an error occurs.
|
|
34834
34985
|
*/
|
|
34835
34986
|
export function unregister(
|
|
34836
34987
|
|
|
@@ -34853,6 +35004,7 @@ declare namespace chrome {
|
|
|
34853
35004
|
* Updates one or more user scripts for this extension.
|
|
34854
35005
|
*
|
|
34855
35006
|
* @param scripts Contains a list of user scripts to be updated. A property is only updated for the existing script if it is specified in this object. If there are errors during script parsing/file validation, or if the IDs specified do not correspond to a fully registered script, then no scripts are updated.
|
|
35007
|
+
* @returns Promise that resolves once scripts have been fully updated. The promise will be rejected if an error occurs.
|
|
34856
35008
|
*/
|
|
34857
35009
|
export function update(
|
|
34858
35010
|
|
|
@@ -34899,6 +35051,7 @@ declare namespace chrome {
|
|
|
34899
35051
|
* Configures the `` `USER_SCRIPT` `` execution environment.
|
|
34900
35052
|
*
|
|
34901
35053
|
* @param properties Contains the user script world configuration.
|
|
35054
|
+
* @returns Promise that resolves once the world has been configured.
|
|
34902
35055
|
*/
|
|
34903
35056
|
export function configureWorld(
|
|
34904
35057
|
|
|
@@ -34920,6 +35073,7 @@ declare namespace chrome {
|
|
|
34920
35073
|
/**
|
|
34921
35074
|
* Retrieves all registered world configurations.
|
|
34922
35075
|
*
|
|
35076
|
+
* @returns Promise that resolves with the registered world configurations.
|
|
34923
35077
|
* @since Chrome 133
|
|
34924
35078
|
*/
|
|
34925
35079
|
export function getWorldConfigurations(): Promise<WorldProperties[]>;
|
|
@@ -34940,6 +35094,7 @@ declare namespace chrome {
|
|
|
34940
35094
|
* Resets the configuration for a user script world. Any scripts that inject into the world with the specified ID will use the default world configuration.
|
|
34941
35095
|
*
|
|
34942
35096
|
* @param worldId The ID of the user script world to reset. If omitted, resets the default world's configuration.
|
|
35097
|
+
* @returns Promise that resolves when the configuration is reset.
|
|
34943
35098
|
* @since Chrome 133
|
|
34944
35099
|
*/
|
|
34945
35100
|
export function resetWorldConfiguration(
|
|
@@ -35161,6 +35316,7 @@ declare namespace chrome {
|
|
|
35161
35316
|
*
|
|
35162
35317
|
* @chrome-returns-extra since Chrome 96
|
|
35163
35318
|
* @param name The name of the VPN configuration.
|
|
35319
|
+
* @returns Returns a Promise which resolves when the configuration is created or rejects if there is an error.
|
|
35164
35320
|
*/
|
|
35165
35321
|
export function createConfig(
|
|
35166
35322
|
|
|
@@ -35189,6 +35345,7 @@ declare namespace chrome {
|
|
|
35189
35345
|
*
|
|
35190
35346
|
* @chrome-returns-extra since Chrome 96
|
|
35191
35347
|
* @param id ID of the VPN configuration to destroy.
|
|
35348
|
+
* @returns Returns a Promise which resolves when the configuration is destroyed or rejects if there is an error.
|
|
35192
35349
|
*/
|
|
35193
35350
|
export function destroyConfig(
|
|
35194
35351
|
|
|
@@ -35212,6 +35369,7 @@ declare namespace chrome {
|
|
|
35212
35369
|
*
|
|
35213
35370
|
* @chrome-returns-extra since Chrome 96
|
|
35214
35371
|
* @param parameters The parameters for the VPN session.
|
|
35372
|
+
* @returns Returns a Promise which resolves when the parameters are set or rejects if there is an error.
|
|
35215
35373
|
*/
|
|
35216
35374
|
export function setParameters(
|
|
35217
35375
|
|
|
@@ -35235,6 +35393,7 @@ declare namespace chrome {
|
|
|
35235
35393
|
*
|
|
35236
35394
|
* @chrome-returns-extra since Chrome 96
|
|
35237
35395
|
* @param data The IP packet to be sent to the platform.
|
|
35396
|
+
* @returns Returns a Promise which resolves when the packet is sent or rejects if there is an error.
|
|
35238
35397
|
*/
|
|
35239
35398
|
export function sendPacket(
|
|
35240
35399
|
|
|
@@ -35258,6 +35417,7 @@ declare namespace chrome {
|
|
|
35258
35417
|
*
|
|
35259
35418
|
* @chrome-returns-extra since Chrome 96
|
|
35260
35419
|
* @param state The VPN session state of the VPN client.
|
|
35420
|
+
* @returns Returns a Promise which resolves when the notification is complete or rejects if there is an error.
|
|
35261
35421
|
*/
|
|
35262
35422
|
export function notifyConnectionStateChanged(
|
|
35263
35423
|
|