We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 138f491 commit 2875b8eCopy full SHA for 2875b8e
1 file changed
examples/plain-javascript/src/main.js
@@ -9,10 +9,12 @@ async function greet_rust() {
9
}
10
async function greet_python() {
11
outputEl.textContent = await tauri.python.call.greet_python(inputField.value);
12
+ // Alternatively:
13
+ // outputEl.textContent = await tauri.python.callFunction("greet_python", [inputField.value])
14
15
16
window.addEventListener("DOMContentLoaded", () => {
- tauri.python.registerJs("greet_python");
17
+ tauri.python.registerJs("greet_python"); // Optional, makes it possible to use "tauri.python.call.greet_python"
18
inputField = document.querySelector("#input-field");
19
outputEl = document.querySelector("#output-element");
20
document.querySelector("#callback-form").addEventListener("submit", (e) => {
0 commit comments