5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 18:29:53 +08:00
wails/v2/test/frameless/frontend/main.js

21 lines
499 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;
});
}
window.closeme = function () {
console.log('here');
window.backend.main.Basic.Close();
}