chrome-types 0.1.75 → 0.1.76

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.
Files changed (3) hide show
  1. package/_all.d.ts +28 -4
  2. package/index.d.ts +28 -4
  3. 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 Thu Dec 23 2021 22:27:55 GMT+0000 (Coordinated Universal Time)
18
- // Built at 1c12e5c64d415f66405ebf2161c9d396ccd0fd6c
17
+ // Generated on Tue Dec 28 2021 22:28:31 GMT+0000 (Coordinated Universal Time)
18
+ // Built at 7965be8be52e2689ad17e4cdf599aa2fc88fb968
19
19
 
20
20
  // Includes all types, including MV2 + Platform Apps APIs.
21
21
 
@@ -22486,6 +22486,14 @@ declare namespace chrome {
22486
22486
  reason: OnRestartRequiredReason,
22487
22487
  ) => void>;
22488
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
+
22489
22497
  /**
22490
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.
22491
22499
  *
@@ -22496,7 +22504,7 @@ declare namespace chrome {
22496
22504
  /**
22497
22505
  * @param backgroundPage The JavaScript 'window' object for the background page.
22498
22506
  */
22499
- callback: (
22507
+ callback?: (
22500
22508
  backgroundPage?: Window,
22501
22509
  ) => void,
22502
22510
  ): void;
@@ -22728,6 +22736,21 @@ declare namespace chrome {
22728
22736
  ) => void,
22729
22737
  ): void;
22730
22738
 
22739
+ /**
22740
+ * Send a single message to a native application.
22741
+ *
22742
+ * @chrome-returns-extra since Pending
22743
+ * @param application The name of the native messaging host.
22744
+ * @param message The message that will be passed to the native messaging host.
22745
+ * @chrome-permission nativeMessaging
22746
+ */
22747
+ export function sendNativeMessage(
22748
+
22749
+ application: string,
22750
+
22751
+ message: {[name: string]: any},
22752
+ ): Promise<any>;
22753
+
22731
22754
  /**
22732
22755
  * Send a single message to a native application.
22733
22756
  *
@@ -22743,8 +22766,9 @@ declare namespace chrome {
22743
22766
 
22744
22767
  /**
22745
22768
  * @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.
22769
+ * @since Pending
22746
22770
  */
22747
- responseCallback?: (
22771
+ callback?: (
22748
22772
  response: any,
22749
22773
  ) => void,
22750
22774
  ): void;
package/index.d.ts CHANGED
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- // Generated on Thu Dec 23 2021 22:27:51 GMT+0000 (Coordinated Universal Time)
18
- // Built at 1c12e5c64d415f66405ebf2161c9d396ccd0fd6c
17
+ // Generated on Tue Dec 28 2021 22:28:26 GMT+0000 (Coordinated Universal Time)
18
+ // Built at 7965be8be52e2689ad17e4cdf599aa2fc88fb968
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,7 +15386,7 @@ 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;
@@ -15610,6 +15618,21 @@ declare namespace chrome {
15610
15618
  ) => void,
15611
15619
  ): void;
15612
15620
 
15621
+ /**
15622
+ * Send a single message to a native application.
15623
+ *
15624
+ * @chrome-returns-extra since Pending
15625
+ * @param application The name of the native messaging host.
15626
+ * @param message The message that will be passed to the native messaging host.
15627
+ * @chrome-permission nativeMessaging
15628
+ */
15629
+ export function sendNativeMessage(
15630
+
15631
+ application: string,
15632
+
15633
+ message: {[name: string]: any},
15634
+ ): Promise<any>;
15635
+
15613
15636
  /**
15614
15637
  * Send a single message to a native application.
15615
15638
  *
@@ -15625,8 +15648,9 @@ declare namespace chrome {
15625
15648
 
15626
15649
  /**
15627
15650
  * @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.
15651
+ * @since Pending
15628
15652
  */
15629
- responseCallback?: (
15653
+ callback?: (
15630
15654
  response: any,
15631
15655
  ) => void,
15632
15656
  ): void;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "module",
6
6
  "name": "chrome-types",
7
7
  "config": {
8
- "build-hash": "f90541d5ad8767fe"
8
+ "build-hash": "41b904c21a85313d"
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.75"
19
+ "version": "0.1.76"
20
20
  }