Implement server to client notify support. (#700)

This commit is contained in:
Alexander Hudek
2021-05-02 13:12:29 +10:00
committed by GitHub
parent 0966c96ef0
commit 3c4f874db5
5 changed files with 619 additions and 12 deletions
+1 -2
View File
@@ -26,9 +26,8 @@ func (b BridgeClient) Quit() {
}
func (b BridgeClient) NotifyEvent(message string) {
//b.session.sendMessage("n" + message)
b.session.sendMessage("n" + message)
b.session.log.Info("NotifyEvent: %s", message)
b.session.log.Info("NotifyEvent unsupported in Bridge mode")
}
func (b BridgeClient) CallResult(message string) {
+4 -4
View File
@@ -1647,10 +1647,10 @@
}
// });
break;
// // Notifications
// case 'n':
// addScript(message.data.slice(1), true);
// break;
// Notifications
case 'n':
window.wails._.Notify(message.data.slice(1));
break;
// // Binding
// case 'b':
// const binding = message.data.slice(1);
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@wails/runtime",
"version": "1.3.12",
"version": "1.3.13",
"description": "Wails V2 Javascript runtime library",
"main": "main.js",
"types": "runtime.d.ts",
File diff suppressed because it is too large Load Diff
@@ -123,10 +123,10 @@ function handleMessage(message) {
}
// });
break;
// // Notifications
// case 'n':
// addScript(message.data.slice(1), true);
// break;
// Notifications
case 'n':
window.wails._.Notify(message.data.slice(1));
break;
// // Binding
// case 'b':
// const binding = message.data.slice(1);