mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 17:39:58 +08:00
16 lines
405 B
JavaScript
16 lines
405 B
JavaScript
// Get input + focus
|
|
var nameElement = document.getElementById("name");
|
|
nameElement.focus();
|
|
|
|
// Stup the greet function
|
|
window.greet = function () {
|
|
|
|
// Get name
|
|
var name = nameElement.value;
|
|
|
|
// Call Basic.Greet(name)
|
|
window.backend.main.Basic.Greet(name).then((result) => {
|
|
// Update result with data back from Basic.Greet()
|
|
document.getElementById("result").innerText = result;
|
|
});
|
|
} |