Open
Conversation
40ac2ef to
f9a7c9a
Compare
Contributor
|
thanks! the and i would do this without any extra function. Anything more advanced should be link to a github-repo if needed. |
Closes #60 Some might say that the setUpdateListener example is too convoluted, but you can't really showcase the usage of `serial` without this much code. Plus, a briefer example is already shown in `sendUpdate()` docs. The code has been tested with the `webxdc-dev` tool, and (mostly) fomatted with Prettier.
f9a7c9a to
7263ac5
Compare
hpk42
reviewed
Jul 17, 2024
Contributor
hpk42
left a comment
There was a problem hiding this comment.
some changes needed i think still
Co-authored-by: holger krekel <holger@merlinux.eu>
hpk42
reviewed
Nov 23, 2024
| } | ||
|
|
||
| // Peers can send messages like this | ||
| window.webxdc.sendUpdate({ payload: "Knight d3" }, "Bob made a move!"); |
Contributor
There was a problem hiding this comment.
above you talk about a hyptothetic chess thing, but suddenly you send a move.
I'd rather stay within the "document state" terminology.
Suggested change
| window.webxdc.sendUpdate({ payload: "Knight d3" }, "Bob made a move!"); | |
| window.webxdc.sendUpdate({ payload: "new document set from ${window.webxdc.selfName}" }); |
hpk42
reviewed
Nov 23, 2024
Comment on lines
+42
to
+43
| // Yours might be more complex, | ||
| // such as applying a chess move to the board. |
Contributor
There was a problem hiding this comment.
Suggested change
| // Yours might be more complex, | |
| // such as applying a chess move to the board. |
Member
Author
|
Ok, feel free to proceed with the suggestions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #60
Some might say that the setUpdateListener example is too convoluted, but you can't really showcase the usage ofserialwithout this much code.Plus, a briefer example is already shown insendUpdate()docs.Update: I simplified the example.
The code has been tested with the
webxdc-devtool,and (mostly) fomatted with Prettier.