5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 19:20:40 +08:00
wails/v2/internal/frontend/runtime/desktop/ipc.js
2021-08-18 22:12:00 +10:00

28 lines
593 B
JavaScript

/*
_ __ _ __
| | / /___ _(_) /____
| | /| / / __ `/ / / ___/
| |/ |/ / /_/ / / (__ )
|__/|__/\__,_/_/_/____/
The lightweight framework for web-like apps
(c) Lea Anthony 2019-present
*/
/* jshint esversion: 6 */
/**
* SendMessage sends the given message to the backend
*
* @param {string} message
*/
window.WailsInvoke = function (message) {
// Call Platform specific invoke method
if (PLATFORM === "windows") {
window.chrome.webview.postMessage(message);
} else if (PLATFORM === "darwin") {
window.blah();
} else {
console.error("Unsupported Platform");
}
};