@nativedesktop/react 0.4.42 → 0.4.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/dist/index.js
CHANGED
|
@@ -2021,8 +2021,12 @@ function request(node, pending, prefix, command, args) {
|
|
|
2021
2021
|
}
|
|
2022
2022
|
});
|
|
2023
2023
|
}
|
|
2024
|
-
function executeJavaScript(node, code, world) {
|
|
2025
|
-
return request(node, pendingEvals, "js", "executeJavaScript",
|
|
2024
|
+
function executeJavaScript(node, code, world, options) {
|
|
2025
|
+
return request(node, pendingEvals, "js", "executeJavaScript", {
|
|
2026
|
+
code,
|
|
2027
|
+
...world ? { world } : {},
|
|
2028
|
+
...options?.userGesture ? { userGesture: true } : {}
|
|
2029
|
+
});
|
|
2026
2030
|
}
|
|
2027
2031
|
function onJavaScriptResult(e) {
|
|
2028
2032
|
const result = e.data;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { NdNodeRef } from "./generated/intrinsics.ts";
|
|
2
|
-
export declare function executeJavaScript(node: NdNodeRef<"webview">, code: string, world?: string
|
|
2
|
+
export declare function executeJavaScript(node: NdNodeRef<"webview">, code: string, world?: string, options?: {
|
|
3
|
+
userGesture?: boolean;
|
|
4
|
+
}): Promise<string>;
|
|
3
5
|
export declare function onJavaScriptResult(e: {
|
|
4
6
|
data: unknown;
|
|
5
7
|
}): void;
|