mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 05:30:22 +08:00
23 lines
508 B
JavaScript
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);
|
|
}
|
|
})(); |