chrome-types 0.1.74 → 0.1.78
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 +186 -12
- package/index.d.ts +139 -9
- package/package.json +2 -2
package/_all.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2022 Google LLC
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
// Generated on
|
|
18
|
-
// Built at
|
|
17
|
+
// Generated on Sat Jan 01 2022 22:28:08 GMT+0000 (Coordinated Universal Time)
|
|
18
|
+
// Built at 06fe0d4ea8eed0657b3cbed751442d15746d0af5
|
|
19
19
|
|
|
20
20
|
// Includes all types, including MV2 + Platform Apps APIs.
|
|
21
21
|
|
|
@@ -12487,6 +12487,33 @@ declare namespace chrome {
|
|
|
12487
12487
|
sendResponse: () => void,
|
|
12488
12488
|
) => void>;
|
|
12489
12489
|
|
|
12490
|
+
/**
|
|
12491
|
+
* Sends a single request to other listeners within the extension. Similar to {@link runtime.connect}, but only sends a single request with an optional response. The {@link extension.onRequest} event is fired in each page of the extension.
|
|
12492
|
+
*
|
|
12493
|
+
* @chrome-returns-extra since Pending
|
|
12494
|
+
* @param extensionId The extension ID of the extension you want to connect to. If omitted, default is your own extension.
|
|
12495
|
+
* @deprecated Please use {@link runtime.sendMessage}.
|
|
12496
|
+
* @chrome-max-manifest MV2
|
|
12497
|
+
*/
|
|
12498
|
+
export function sendRequest(
|
|
12499
|
+
|
|
12500
|
+
extensionId: string,
|
|
12501
|
+
|
|
12502
|
+
request: any,
|
|
12503
|
+
): Promise<any>;
|
|
12504
|
+
|
|
12505
|
+
/**
|
|
12506
|
+
* Sends a single request to other listeners within the extension. Similar to {@link runtime.connect}, but only sends a single request with an optional response. The {@link extension.onRequest} event is fired in each page of the extension.
|
|
12507
|
+
*
|
|
12508
|
+
* @chrome-returns-extra since Pending
|
|
12509
|
+
* @deprecated Please use {@link runtime.sendMessage}.
|
|
12510
|
+
* @chrome-max-manifest MV2
|
|
12511
|
+
*/
|
|
12512
|
+
export function sendRequest(
|
|
12513
|
+
|
|
12514
|
+
request: any,
|
|
12515
|
+
): Promise<any>;
|
|
12516
|
+
|
|
12490
12517
|
/**
|
|
12491
12518
|
* Sends a single request to other listeners within the extension. Similar to {@link runtime.connect}, but only sends a single request with an optional response. The {@link extension.onRequest} event is fired in each page of the extension.
|
|
12492
12519
|
*
|
|
@@ -12502,8 +12529,9 @@ declare namespace chrome {
|
|
|
12502
12529
|
|
|
12503
12530
|
/**
|
|
12504
12531
|
* @param response The JSON response object sent by the handler of the request. If an error occurs while connecting to the extension, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
|
|
12532
|
+
* @since Pending
|
|
12505
12533
|
*/
|
|
12506
|
-
|
|
12534
|
+
callback?: (
|
|
12507
12535
|
response: any,
|
|
12508
12536
|
) => void,
|
|
12509
12537
|
): void;
|
|
@@ -12520,8 +12548,9 @@ declare namespace chrome {
|
|
|
12520
12548
|
|
|
12521
12549
|
/**
|
|
12522
12550
|
* @param response The JSON response object sent by the handler of the request. If an error occurs while connecting to the extension, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
|
|
12551
|
+
* @since Pending
|
|
12523
12552
|
*/
|
|
12524
|
-
|
|
12553
|
+
callback?: (
|
|
12525
12554
|
response: any,
|
|
12526
12555
|
) => void,
|
|
12527
12556
|
): void;
|
|
@@ -22457,6 +22486,14 @@ declare namespace chrome {
|
|
|
22457
22486
|
reason: OnRestartRequiredReason,
|
|
22458
22487
|
) => void>;
|
|
22459
22488
|
|
|
22489
|
+
/**
|
|
22490
|
+
* Retrieves the JavaScript 'window' object for the background page running inside the current extension/app. If the background page is an event page, the system will ensure it is loaded before calling the callback. If there is no background page, an error is set.
|
|
22491
|
+
*
|
|
22492
|
+
* @chrome-returns-extra since Pending
|
|
22493
|
+
* @chrome-disallow-service-workers
|
|
22494
|
+
*/
|
|
22495
|
+
export function getBackgroundPage(): Promise<Window | undefined>;
|
|
22496
|
+
|
|
22460
22497
|
/**
|
|
22461
22498
|
* Retrieves the JavaScript 'window' object for the background page running inside the current extension/app. If the background page is an event page, the system will ensure it is loaded before calling the callback. If there is no background page, an error is set.
|
|
22462
22499
|
*
|
|
@@ -22467,11 +22504,22 @@ declare namespace chrome {
|
|
|
22467
22504
|
/**
|
|
22468
22505
|
* @param backgroundPage The JavaScript 'window' object for the background page.
|
|
22469
22506
|
*/
|
|
22470
|
-
callback
|
|
22507
|
+
callback?: (
|
|
22471
22508
|
backgroundPage?: Window,
|
|
22472
22509
|
) => void,
|
|
22473
22510
|
): void;
|
|
22474
22511
|
|
|
22512
|
+
/**
|
|
22513
|
+
* Open your Extension's options page, if possible.
|
|
22514
|
+
*
|
|
22515
|
+
* The precise behavior may depend on your manifest's `[options_ui](https://developer.chrome.com/docs/extensions/optionsV2)` or `[options_page](https://developer.chrome.com/docs/extensions/options)` key, or what Chrome happens to support at the time. For example, the page may be opened in a new tab, within chrome://extensions, within an App, or it may just focus an open options page. It will never cause the caller page to reload.
|
|
22516
|
+
*
|
|
22517
|
+
* If your Extension does not declare an options page, or Chrome failed to create one for some other reason, the callback will set {@link lastError}.
|
|
22518
|
+
*
|
|
22519
|
+
* @chrome-returns-extra since Pending
|
|
22520
|
+
*/
|
|
22521
|
+
export function openOptionsPage(): Promise<void>;
|
|
22522
|
+
|
|
22475
22523
|
/**
|
|
22476
22524
|
* Open your Extension's options page, if possible.
|
|
22477
22525
|
*
|
|
@@ -22502,6 +22550,17 @@ declare namespace chrome {
|
|
|
22502
22550
|
path: string,
|
|
22503
22551
|
): string;
|
|
22504
22552
|
|
|
22553
|
+
/**
|
|
22554
|
+
* Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and implement surveys. Maximum 255 characters.
|
|
22555
|
+
*
|
|
22556
|
+
* @chrome-returns-extra since Pending
|
|
22557
|
+
* @param url URL to be opened after the extension is uninstalled. This URL must have an http: or https: scheme. Set an empty string to not open a new tab upon uninstallation.
|
|
22558
|
+
*/
|
|
22559
|
+
export function setUninstallURL(
|
|
22560
|
+
|
|
22561
|
+
url: string,
|
|
22562
|
+
): Promise<void>;
|
|
22563
|
+
|
|
22505
22564
|
/**
|
|
22506
22565
|
* Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and implement surveys. Maximum 255 characters.
|
|
22507
22566
|
*
|
|
@@ -22553,6 +22612,18 @@ declare namespace chrome {
|
|
|
22553
22612
|
*/
|
|
22554
22613
|
export function restart(): void;
|
|
22555
22614
|
|
|
22615
|
+
/**
|
|
22616
|
+
* Restart the ChromeOS device when the app runs in kiosk mode after the given seconds. If called again before the time ends, the reboot will be delayed. If called with a value of -1, the reboot will be cancelled. It's a no-op in non-kiosk mode. It's only allowed to be called repeatedly by the first extension to invoke this API.
|
|
22617
|
+
*
|
|
22618
|
+
* @chrome-returns-extra since Pending
|
|
22619
|
+
* @param seconds Time to wait in seconds before rebooting the device, or -1 to cancel a scheduled reboot.
|
|
22620
|
+
* @since Chrome 53
|
|
22621
|
+
*/
|
|
22622
|
+
export function restartAfterDelay(
|
|
22623
|
+
|
|
22624
|
+
seconds: number,
|
|
22625
|
+
): Promise<void>;
|
|
22626
|
+
|
|
22556
22627
|
/**
|
|
22557
22628
|
* Restart the ChromeOS device when the app runs in kiosk mode after the given seconds. If called again before the time ends, the reboot will be delayed. If called with a value of -1, the reboot will be cancelled. It's a no-op in non-kiosk mode. It's only allowed to be called repeatedly by the first extension to invoke this API.
|
|
22558
22629
|
*
|
|
@@ -22603,6 +22674,47 @@ declare namespace chrome {
|
|
|
22603
22674
|
application: string,
|
|
22604
22675
|
): Port;
|
|
22605
22676
|
|
|
22677
|
+
/**
|
|
22678
|
+
* Sends a single message to event listeners within your extension/app or a different extension/app. Similar to {@link runtime.connect} but only sends a single message, with an optional response. If sending to your extension, the {@link runtime.onMessage} event will be fired in every frame of your extension (except for the sender's frame), or {@link runtime.onMessageExternal}, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use {@link tabs.sendMessage}.
|
|
22679
|
+
*
|
|
22680
|
+
* @chrome-returns-extra since Pending
|
|
22681
|
+
* @param extensionId The ID of the extension/app to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for [web messaging](https://developer.chrome.com/docs/extensions/manifest/externally_connectable).
|
|
22682
|
+
* @param message The message to send. This message should be a JSON-ifiable object.
|
|
22683
|
+
*/
|
|
22684
|
+
export function sendMessage(
|
|
22685
|
+
|
|
22686
|
+
extensionId: string,
|
|
22687
|
+
|
|
22688
|
+
message: any,
|
|
22689
|
+
|
|
22690
|
+
options?: {
|
|
22691
|
+
|
|
22692
|
+
/**
|
|
22693
|
+
* Whether the TLS channel ID will be passed into onMessageExternal for processes that are listening for the connection event.
|
|
22694
|
+
*/
|
|
22695
|
+
includeTlsChannelId?: boolean,
|
|
22696
|
+
},
|
|
22697
|
+
): Promise<any>;
|
|
22698
|
+
|
|
22699
|
+
/**
|
|
22700
|
+
* Sends a single message to event listeners within your extension/app or a different extension/app. Similar to {@link runtime.connect} but only sends a single message, with an optional response. If sending to your extension, the {@link runtime.onMessage} event will be fired in every frame of your extension (except for the sender's frame), or {@link runtime.onMessageExternal}, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use {@link tabs.sendMessage}.
|
|
22701
|
+
*
|
|
22702
|
+
* @chrome-returns-extra since Pending
|
|
22703
|
+
* @param message The message to send. This message should be a JSON-ifiable object.
|
|
22704
|
+
*/
|
|
22705
|
+
export function sendMessage(
|
|
22706
|
+
|
|
22707
|
+
message: any,
|
|
22708
|
+
|
|
22709
|
+
options?: {
|
|
22710
|
+
|
|
22711
|
+
/**
|
|
22712
|
+
* Whether the TLS channel ID will be passed into onMessageExternal for processes that are listening for the connection event.
|
|
22713
|
+
*/
|
|
22714
|
+
includeTlsChannelId?: boolean,
|
|
22715
|
+
},
|
|
22716
|
+
): Promise<any>;
|
|
22717
|
+
|
|
22606
22718
|
/**
|
|
22607
22719
|
* Sends a single message to event listeners within your extension/app or a different extension/app. Similar to {@link runtime.connect} but only sends a single message, with an optional response. If sending to your extension, the {@link runtime.onMessage} event will be fired in every frame of your extension (except for the sender's frame), or {@link runtime.onMessageExternal}, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use {@link tabs.sendMessage}.
|
|
22608
22720
|
*
|
|
@@ -22625,8 +22737,9 @@ declare namespace chrome {
|
|
|
22625
22737
|
|
|
22626
22738
|
/**
|
|
22627
22739
|
* @param response The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
|
|
22740
|
+
* @since Pending
|
|
22628
22741
|
*/
|
|
22629
|
-
|
|
22742
|
+
callback?: (
|
|
22630
22743
|
response: any,
|
|
22631
22744
|
) => void,
|
|
22632
22745
|
): void;
|
|
@@ -22650,12 +22763,28 @@ declare namespace chrome {
|
|
|
22650
22763
|
|
|
22651
22764
|
/**
|
|
22652
22765
|
* @param response The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
|
|
22766
|
+
* @since Pending
|
|
22653
22767
|
*/
|
|
22654
|
-
|
|
22768
|
+
callback?: (
|
|
22655
22769
|
response: any,
|
|
22656
22770
|
) => void,
|
|
22657
22771
|
): void;
|
|
22658
22772
|
|
|
22773
|
+
/**
|
|
22774
|
+
* Send a single message to a native application.
|
|
22775
|
+
*
|
|
22776
|
+
* @chrome-returns-extra since Pending
|
|
22777
|
+
* @param application The name of the native messaging host.
|
|
22778
|
+
* @param message The message that will be passed to the native messaging host.
|
|
22779
|
+
* @chrome-permission nativeMessaging
|
|
22780
|
+
*/
|
|
22781
|
+
export function sendNativeMessage(
|
|
22782
|
+
|
|
22783
|
+
application: string,
|
|
22784
|
+
|
|
22785
|
+
message: {[name: string]: any},
|
|
22786
|
+
): Promise<any>;
|
|
22787
|
+
|
|
22659
22788
|
/**
|
|
22660
22789
|
* Send a single message to a native application.
|
|
22661
22790
|
*
|
|
@@ -22671,12 +22800,20 @@ declare namespace chrome {
|
|
|
22671
22800
|
|
|
22672
22801
|
/**
|
|
22673
22802
|
* @param response The response message sent by the native messaging host. If an error occurs while connecting to the native messaging host, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
|
|
22803
|
+
* @since Pending
|
|
22674
22804
|
*/
|
|
22675
|
-
|
|
22805
|
+
callback?: (
|
|
22676
22806
|
response: any,
|
|
22677
22807
|
) => void,
|
|
22678
22808
|
): void;
|
|
22679
22809
|
|
|
22810
|
+
/**
|
|
22811
|
+
* Returns information about the current platform.
|
|
22812
|
+
*
|
|
22813
|
+
* @chrome-returns-extra since Pending
|
|
22814
|
+
*/
|
|
22815
|
+
export function getPlatformInfo(): Promise<PlatformInfo>;
|
|
22816
|
+
|
|
22680
22817
|
/**
|
|
22681
22818
|
* Returns information about the current platform.
|
|
22682
22819
|
*
|
|
@@ -22684,7 +22821,7 @@ declare namespace chrome {
|
|
|
22684
22821
|
*/
|
|
22685
22822
|
export function getPlatformInfo(
|
|
22686
22823
|
|
|
22687
|
-
callback
|
|
22824
|
+
callback?: (
|
|
22688
22825
|
platformInfo: PlatformInfo,
|
|
22689
22826
|
) => void,
|
|
22690
22827
|
): void;
|
|
@@ -27954,6 +28091,20 @@ declare namespace chrome {
|
|
|
27954
28091
|
},
|
|
27955
28092
|
): runtime.Port;
|
|
27956
28093
|
|
|
28094
|
+
/**
|
|
28095
|
+
* Sends a single request to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The {@link extension.onRequest} event is fired in each content script running in the specified tab for the current extension.
|
|
28096
|
+
*
|
|
28097
|
+
* @chrome-returns-extra since Pending
|
|
28098
|
+
* @deprecated Please use {@link runtime.sendMessage}.
|
|
28099
|
+
* @chrome-max-manifest MV2
|
|
28100
|
+
*/
|
|
28101
|
+
export function sendRequest(
|
|
28102
|
+
|
|
28103
|
+
tabId: number,
|
|
28104
|
+
|
|
28105
|
+
request: any,
|
|
28106
|
+
): Promise<any>;
|
|
28107
|
+
|
|
27957
28108
|
/**
|
|
27958
28109
|
* Sends a single request to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The {@link extension.onRequest} event is fired in each content script running in the specified tab for the current extension.
|
|
27959
28110
|
*
|
|
@@ -27968,12 +28119,34 @@ declare namespace chrome {
|
|
|
27968
28119
|
|
|
27969
28120
|
/**
|
|
27970
28121
|
* @param response The JSON response object sent by the handler of the request. If an error occurs while connecting to the specified tab, the callback is called with no arguments and {@link runtime.lastError} is set to the error message.
|
|
28122
|
+
* @since Pending
|
|
27971
28123
|
*/
|
|
27972
|
-
|
|
28124
|
+
callback?: (
|
|
27973
28125
|
response: any,
|
|
27974
28126
|
) => void,
|
|
27975
28127
|
): void;
|
|
27976
28128
|
|
|
28129
|
+
/**
|
|
28130
|
+
* Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The {@link runtime.onMessage} event is fired in each content script running in the specified tab for the current extension.
|
|
28131
|
+
*
|
|
28132
|
+
* @chrome-returns-extra since Pending
|
|
28133
|
+
* @param message The message to send. This message should be a JSON-ifiable object.
|
|
28134
|
+
*/
|
|
28135
|
+
export function sendMessage(
|
|
28136
|
+
|
|
28137
|
+
tabId: number,
|
|
28138
|
+
|
|
28139
|
+
message: any,
|
|
28140
|
+
|
|
28141
|
+
options?: {
|
|
28142
|
+
|
|
28143
|
+
/**
|
|
28144
|
+
* Send a message to a specific [frame](https://developer.chrome.com/docs/extensions/reference/webNavigation/#frame_ids) identified by `frameId` instead of all frames in the tab.
|
|
28145
|
+
*/
|
|
28146
|
+
frameId?: number,
|
|
28147
|
+
},
|
|
28148
|
+
): Promise<any>;
|
|
28149
|
+
|
|
27977
28150
|
/**
|
|
27978
28151
|
* Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The {@link runtime.onMessage} event is fired in each content script running in the specified tab for the current extension.
|
|
27979
28152
|
*
|
|
@@ -27995,8 +28168,9 @@ declare namespace chrome {
|
|
|
27995
28168
|
|
|
27996
28169
|
/**
|
|
27997
28170
|
* @param response The JSON response object sent by the handler of the message. If an error occurs while connecting to the specified tab, the callback is called with no arguments and {@link runtime.lastError} is set to the error message.
|
|
28171
|
+
* @since Pending
|
|
27998
28172
|
*/
|
|
27999
|
-
|
|
28173
|
+
callback?: (
|
|
28000
28174
|
response: any,
|
|
28001
28175
|
) => void,
|
|
28002
28176
|
): void;
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2022 Google LLC
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
// Generated on
|
|
18
|
-
// Built at
|
|
17
|
+
// Generated on Sat Jan 01 2022 22:28:03 GMT+0000 (Coordinated Universal Time)
|
|
18
|
+
// Built at 06fe0d4ea8eed0657b3cbed751442d15746d0af5
|
|
19
19
|
|
|
20
20
|
// Includes MV3+ APIs only.
|
|
21
21
|
|
|
@@ -15368,6 +15368,14 @@ declare namespace chrome {
|
|
|
15368
15368
|
reason: OnRestartRequiredReason,
|
|
15369
15369
|
) => void>;
|
|
15370
15370
|
|
|
15371
|
+
/**
|
|
15372
|
+
* Retrieves the JavaScript 'window' object for the background page running inside the current extension/app. If the background page is an event page, the system will ensure it is loaded before calling the callback. If there is no background page, an error is set.
|
|
15373
|
+
*
|
|
15374
|
+
* @chrome-returns-extra since Pending
|
|
15375
|
+
* @chrome-disallow-service-workers
|
|
15376
|
+
*/
|
|
15377
|
+
export function getBackgroundPage(): Promise<Window | undefined>;
|
|
15378
|
+
|
|
15371
15379
|
/**
|
|
15372
15380
|
* Retrieves the JavaScript 'window' object for the background page running inside the current extension/app. If the background page is an event page, the system will ensure it is loaded before calling the callback. If there is no background page, an error is set.
|
|
15373
15381
|
*
|
|
@@ -15378,11 +15386,22 @@ declare namespace chrome {
|
|
|
15378
15386
|
/**
|
|
15379
15387
|
* @param backgroundPage The JavaScript 'window' object for the background page.
|
|
15380
15388
|
*/
|
|
15381
|
-
callback
|
|
15389
|
+
callback?: (
|
|
15382
15390
|
backgroundPage?: Window,
|
|
15383
15391
|
) => void,
|
|
15384
15392
|
): void;
|
|
15385
15393
|
|
|
15394
|
+
/**
|
|
15395
|
+
* Open your Extension's options page, if possible.
|
|
15396
|
+
*
|
|
15397
|
+
* The precise behavior may depend on your manifest's `[options_ui](https://developer.chrome.com/docs/extensions/optionsV2)` or `[options_page](https://developer.chrome.com/docs/extensions/options)` key, or what Chrome happens to support at the time. For example, the page may be opened in a new tab, within chrome://extensions, within an App, or it may just focus an open options page. It will never cause the caller page to reload.
|
|
15398
|
+
*
|
|
15399
|
+
* If your Extension does not declare an options page, or Chrome failed to create one for some other reason, the callback will set {@link lastError}.
|
|
15400
|
+
*
|
|
15401
|
+
* @chrome-returns-extra since Pending
|
|
15402
|
+
*/
|
|
15403
|
+
export function openOptionsPage(): Promise<void>;
|
|
15404
|
+
|
|
15386
15405
|
/**
|
|
15387
15406
|
* Open your Extension's options page, if possible.
|
|
15388
15407
|
*
|
|
@@ -15413,6 +15432,17 @@ declare namespace chrome {
|
|
|
15413
15432
|
path: string,
|
|
15414
15433
|
): string;
|
|
15415
15434
|
|
|
15435
|
+
/**
|
|
15436
|
+
* Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and implement surveys. Maximum 255 characters.
|
|
15437
|
+
*
|
|
15438
|
+
* @chrome-returns-extra since Pending
|
|
15439
|
+
* @param url URL to be opened after the extension is uninstalled. This URL must have an http: or https: scheme. Set an empty string to not open a new tab upon uninstallation.
|
|
15440
|
+
*/
|
|
15441
|
+
export function setUninstallURL(
|
|
15442
|
+
|
|
15443
|
+
url: string,
|
|
15444
|
+
): Promise<void>;
|
|
15445
|
+
|
|
15416
15446
|
/**
|
|
15417
15447
|
* Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and implement surveys. Maximum 255 characters.
|
|
15418
15448
|
*
|
|
@@ -15464,6 +15494,18 @@ declare namespace chrome {
|
|
|
15464
15494
|
*/
|
|
15465
15495
|
export function restart(): void;
|
|
15466
15496
|
|
|
15497
|
+
/**
|
|
15498
|
+
* Restart the ChromeOS device when the app runs in kiosk mode after the given seconds. If called again before the time ends, the reboot will be delayed. If called with a value of -1, the reboot will be cancelled. It's a no-op in non-kiosk mode. It's only allowed to be called repeatedly by the first extension to invoke this API.
|
|
15499
|
+
*
|
|
15500
|
+
* @chrome-returns-extra since Pending
|
|
15501
|
+
* @param seconds Time to wait in seconds before rebooting the device, or -1 to cancel a scheduled reboot.
|
|
15502
|
+
* @since Chrome 53
|
|
15503
|
+
*/
|
|
15504
|
+
export function restartAfterDelay(
|
|
15505
|
+
|
|
15506
|
+
seconds: number,
|
|
15507
|
+
): Promise<void>;
|
|
15508
|
+
|
|
15467
15509
|
/**
|
|
15468
15510
|
* Restart the ChromeOS device when the app runs in kiosk mode after the given seconds. If called again before the time ends, the reboot will be delayed. If called with a value of -1, the reboot will be cancelled. It's a no-op in non-kiosk mode. It's only allowed to be called repeatedly by the first extension to invoke this API.
|
|
15469
15511
|
*
|
|
@@ -15514,6 +15556,47 @@ declare namespace chrome {
|
|
|
15514
15556
|
application: string,
|
|
15515
15557
|
): Port;
|
|
15516
15558
|
|
|
15559
|
+
/**
|
|
15560
|
+
* Sends a single message to event listeners within your extension/app or a different extension/app. Similar to {@link runtime.connect} but only sends a single message, with an optional response. If sending to your extension, the {@link runtime.onMessage} event will be fired in every frame of your extension (except for the sender's frame), or {@link runtime.onMessageExternal}, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use {@link tabs.sendMessage}.
|
|
15561
|
+
*
|
|
15562
|
+
* @chrome-returns-extra since Pending
|
|
15563
|
+
* @param extensionId The ID of the extension/app to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for [web messaging](https://developer.chrome.com/docs/extensions/manifest/externally_connectable).
|
|
15564
|
+
* @param message The message to send. This message should be a JSON-ifiable object.
|
|
15565
|
+
*/
|
|
15566
|
+
export function sendMessage(
|
|
15567
|
+
|
|
15568
|
+
extensionId: string,
|
|
15569
|
+
|
|
15570
|
+
message: any,
|
|
15571
|
+
|
|
15572
|
+
options?: {
|
|
15573
|
+
|
|
15574
|
+
/**
|
|
15575
|
+
* Whether the TLS channel ID will be passed into onMessageExternal for processes that are listening for the connection event.
|
|
15576
|
+
*/
|
|
15577
|
+
includeTlsChannelId?: boolean,
|
|
15578
|
+
},
|
|
15579
|
+
): Promise<any>;
|
|
15580
|
+
|
|
15581
|
+
/**
|
|
15582
|
+
* Sends a single message to event listeners within your extension/app or a different extension/app. Similar to {@link runtime.connect} but only sends a single message, with an optional response. If sending to your extension, the {@link runtime.onMessage} event will be fired in every frame of your extension (except for the sender's frame), or {@link runtime.onMessageExternal}, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use {@link tabs.sendMessage}.
|
|
15583
|
+
*
|
|
15584
|
+
* @chrome-returns-extra since Pending
|
|
15585
|
+
* @param message The message to send. This message should be a JSON-ifiable object.
|
|
15586
|
+
*/
|
|
15587
|
+
export function sendMessage(
|
|
15588
|
+
|
|
15589
|
+
message: any,
|
|
15590
|
+
|
|
15591
|
+
options?: {
|
|
15592
|
+
|
|
15593
|
+
/**
|
|
15594
|
+
* Whether the TLS channel ID will be passed into onMessageExternal for processes that are listening for the connection event.
|
|
15595
|
+
*/
|
|
15596
|
+
includeTlsChannelId?: boolean,
|
|
15597
|
+
},
|
|
15598
|
+
): Promise<any>;
|
|
15599
|
+
|
|
15517
15600
|
/**
|
|
15518
15601
|
* Sends a single message to event listeners within your extension/app or a different extension/app. Similar to {@link runtime.connect} but only sends a single message, with an optional response. If sending to your extension, the {@link runtime.onMessage} event will be fired in every frame of your extension (except for the sender's frame), or {@link runtime.onMessageExternal}, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use {@link tabs.sendMessage}.
|
|
15519
15602
|
*
|
|
@@ -15536,8 +15619,9 @@ declare namespace chrome {
|
|
|
15536
15619
|
|
|
15537
15620
|
/**
|
|
15538
15621
|
* @param response The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
|
|
15622
|
+
* @since Pending
|
|
15539
15623
|
*/
|
|
15540
|
-
|
|
15624
|
+
callback?: (
|
|
15541
15625
|
response: any,
|
|
15542
15626
|
) => void,
|
|
15543
15627
|
): void;
|
|
@@ -15561,12 +15645,28 @@ declare namespace chrome {
|
|
|
15561
15645
|
|
|
15562
15646
|
/**
|
|
15563
15647
|
* @param response The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
|
|
15648
|
+
* @since Pending
|
|
15564
15649
|
*/
|
|
15565
|
-
|
|
15650
|
+
callback?: (
|
|
15566
15651
|
response: any,
|
|
15567
15652
|
) => void,
|
|
15568
15653
|
): void;
|
|
15569
15654
|
|
|
15655
|
+
/**
|
|
15656
|
+
* Send a single message to a native application.
|
|
15657
|
+
*
|
|
15658
|
+
* @chrome-returns-extra since Pending
|
|
15659
|
+
* @param application The name of the native messaging host.
|
|
15660
|
+
* @param message The message that will be passed to the native messaging host.
|
|
15661
|
+
* @chrome-permission nativeMessaging
|
|
15662
|
+
*/
|
|
15663
|
+
export function sendNativeMessage(
|
|
15664
|
+
|
|
15665
|
+
application: string,
|
|
15666
|
+
|
|
15667
|
+
message: {[name: string]: any},
|
|
15668
|
+
): Promise<any>;
|
|
15669
|
+
|
|
15570
15670
|
/**
|
|
15571
15671
|
* Send a single message to a native application.
|
|
15572
15672
|
*
|
|
@@ -15582,12 +15682,20 @@ declare namespace chrome {
|
|
|
15582
15682
|
|
|
15583
15683
|
/**
|
|
15584
15684
|
* @param response The response message sent by the native messaging host. If an error occurs while connecting to the native messaging host, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
|
|
15685
|
+
* @since Pending
|
|
15585
15686
|
*/
|
|
15586
|
-
|
|
15687
|
+
callback?: (
|
|
15587
15688
|
response: any,
|
|
15588
15689
|
) => void,
|
|
15589
15690
|
): void;
|
|
15590
15691
|
|
|
15692
|
+
/**
|
|
15693
|
+
* Returns information about the current platform.
|
|
15694
|
+
*
|
|
15695
|
+
* @chrome-returns-extra since Pending
|
|
15696
|
+
*/
|
|
15697
|
+
export function getPlatformInfo(): Promise<PlatformInfo>;
|
|
15698
|
+
|
|
15591
15699
|
/**
|
|
15592
15700
|
* Returns information about the current platform.
|
|
15593
15701
|
*
|
|
@@ -15595,7 +15703,7 @@ declare namespace chrome {
|
|
|
15595
15703
|
*/
|
|
15596
15704
|
export function getPlatformInfo(
|
|
15597
15705
|
|
|
15598
|
-
callback
|
|
15706
|
+
callback?: (
|
|
15599
15707
|
platformInfo: PlatformInfo,
|
|
15600
15708
|
) => void,
|
|
15601
15709
|
): void;
|
|
@@ -18348,6 +18456,27 @@ declare namespace chrome {
|
|
|
18348
18456
|
},
|
|
18349
18457
|
): runtime.Port;
|
|
18350
18458
|
|
|
18459
|
+
/**
|
|
18460
|
+
* Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The {@link runtime.onMessage} event is fired in each content script running in the specified tab for the current extension.
|
|
18461
|
+
*
|
|
18462
|
+
* @chrome-returns-extra since Pending
|
|
18463
|
+
* @param message The message to send. This message should be a JSON-ifiable object.
|
|
18464
|
+
*/
|
|
18465
|
+
export function sendMessage(
|
|
18466
|
+
|
|
18467
|
+
tabId: number,
|
|
18468
|
+
|
|
18469
|
+
message: any,
|
|
18470
|
+
|
|
18471
|
+
options?: {
|
|
18472
|
+
|
|
18473
|
+
/**
|
|
18474
|
+
* Send a message to a specific [frame](https://developer.chrome.com/docs/extensions/reference/webNavigation/#frame_ids) identified by `frameId` instead of all frames in the tab.
|
|
18475
|
+
*/
|
|
18476
|
+
frameId?: number,
|
|
18477
|
+
},
|
|
18478
|
+
): Promise<any>;
|
|
18479
|
+
|
|
18351
18480
|
/**
|
|
18352
18481
|
* Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The {@link runtime.onMessage} event is fired in each content script running in the specified tab for the current extension.
|
|
18353
18482
|
*
|
|
@@ -18369,8 +18498,9 @@ declare namespace chrome {
|
|
|
18369
18498
|
|
|
18370
18499
|
/**
|
|
18371
18500
|
* @param response The JSON response object sent by the handler of the message. If an error occurs while connecting to the specified tab, the callback is called with no arguments and {@link runtime.lastError} is set to the error message.
|
|
18501
|
+
* @since Pending
|
|
18372
18502
|
*/
|
|
18373
|
-
|
|
18503
|
+
callback?: (
|
|
18374
18504
|
response: any,
|
|
18375
18505
|
) => void,
|
|
18376
18506
|
): void;
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"type": "module",
|
|
6
6
|
"name": "chrome-types",
|
|
7
7
|
"config": {
|
|
8
|
-
"build-hash": "
|
|
8
|
+
"build-hash": "1bd2fdd933fcc8f3"
|
|
9
9
|
},
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
"url": "https://github.com/GoogleChrome/chrome-types/issues"
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/GoogleChrome/chrome-types",
|
|
19
|
-
"version": "0.1.
|
|
19
|
+
"version": "0.1.78"
|
|
20
20
|
}
|