5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 05:30:22 +08:00
wails/v3/internal/runtime/desktop/ipc.js
2023-01-18 21:42:49 +11:00

23 lines
508 B
JavaScript

/*
_ __ _ __
| | / /___ _(_) /____
| | /| / / __ `/ / / ___/
| |/ |/ / /_/ / / (__ )
|__/|__/\__,_/_/_/____/
The electron alternative for Go
(c) Lea Anthony 2019-present
*/
/* jshint esversion: 6 */
/**
* WailsInvoke sends the given message to the backend
*
* @param {string} message
*/
(function () {
window.WailsInvoke = (message) => {
WINDOWS && window.chrome.webview.postMessage(message);
(DARWIN || LINUX) && window.webkit.messageHandlers.wails.postMessage(message);
}
})();