Skip to content

Commit

Permalink
Improve events messages to underline their origin
Browse files Browse the repository at this point in the history
  • Loading branch information
Yassen Damyanov committed Jul 21, 2021
1 parent bc0e11c commit 72613e9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ What appears on the console:
sendEvent() called
onUserClick() called
user-click
{"message": "Mmmm ... Tauri looks good!"}
{"message": "Tauri looks good! (coming from front-end)"}
```

which means that the front-end listener has intercepted the front-end `emit`
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn main() {
app.emit_all(
"user-click",
Payload {
message: "Tauri is awesome!".into(),
message: "Tauri is awesome! (coming from back-end)".into(),
},
)
.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

sendEvent = () => {
console.log('sendEvent() called');
eventMod.emit('user-click', '{"message": "Mmmm ... Tauri looks good!"}');
eventMod.emit('user-click', '{"message": "Tauri looks good! (coming from front-end)"}');
};
});

Expand Down

0 comments on commit 72613e9

Please sign in to comment.