@openfin/remote-adapter 46.100.40 → 46.100.43
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/out/remote-adapter.js +27 -0
- package/package.json +2 -2
package/out/remote-adapter.js
CHANGED
|
@@ -2751,6 +2751,33 @@ class WebContents extends EmitterBase {
|
|
|
2751
2751
|
setZoomLevel(level) {
|
|
2752
2752
|
return this.wire.sendAction('set-zoom-level', { ...this.identity, level }).then(() => undefined);
|
|
2753
2753
|
}
|
|
2754
|
+
/**
|
|
2755
|
+
* Translates the WebContents from the source language to the target language.
|
|
2756
|
+
*
|
|
2757
|
+
* Translation requires a translation API key to be configured on the machine. If translation is
|
|
2758
|
+
* unavailable, the call is a no-op and a `translation-state-changed` event is emitted describing
|
|
2759
|
+
* the failure.
|
|
2760
|
+
*
|
|
2761
|
+
* @param options Source and target languages for the translation.
|
|
2762
|
+
*/
|
|
2763
|
+
async translatePage(options) {
|
|
2764
|
+
await this.wire.sendAction('translate-page', { ...this.identity, ...options });
|
|
2765
|
+
}
|
|
2766
|
+
/**
|
|
2767
|
+
* Reverts a previously translated WebContents back to its original language.
|
|
2768
|
+
*
|
|
2769
|
+
* If the WebContents is not currently translated, this is a no-op and resolves successfully.
|
|
2770
|
+
*/
|
|
2771
|
+
async revertTranslation() {
|
|
2772
|
+
await this.wire.sendAction('revert-translation', this.identity);
|
|
2773
|
+
}
|
|
2774
|
+
/**
|
|
2775
|
+
* Gets the current content-translation state of the WebContents.
|
|
2776
|
+
*/
|
|
2777
|
+
async getTranslationState() {
|
|
2778
|
+
const { payload } = await this.wire.sendAction('get-translation-state', this.identity);
|
|
2779
|
+
return payload.data;
|
|
2780
|
+
}
|
|
2754
2781
|
/**
|
|
2755
2782
|
* Navigates the WebContents to a specified URL.
|
|
2756
2783
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfin/remote-adapter",
|
|
3
|
-
"version": "46.100.
|
|
3
|
+
"version": "46.100.43",
|
|
4
4
|
"description": "Establish intermachine runtime connections using webRTC.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"private": false,
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"es-toolkit": "^1.39.3",
|
|
18
18
|
"tslib": "2.8.1",
|
|
19
|
-
"@openfin/core": "46.100.
|
|
19
|
+
"@openfin/core": "46.100.43"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"prebuild": "rimraf ./out",
|