-
Notifications
You must be signed in to change notification settings - Fork 956
syscall/js.FuncOf support #367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Of course, this doesn't work well with Go 1.11 because |
I was thinking that it may be better to add a new example that uses |
I think we could add it to the non-export example without making it too busy. |
New attempt, now more carefully written. |
I've now split the examples, it seems cleaner to me (although there is a bit of duplication). It clearly shows both ways of doing the same thing which may be useful. @johanbrandhorst @justinclift any thoughts? |
Rename panic functions to be runtime.nilPanic, runtime.lookupPanic, and runtime.slicePanic.
I have updated the callback example to be more in a functional style. Not sure whether this example is much better but would like to hear some thoughts on it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
<h1>WebAssembly</h1> | ||
<p>Add two numbers, using WebAssembly:</p> | ||
<input type="number" id="a" value="0" /> + <input type="number" id="b" value="0" /> = <input type="number" | ||
id="result" readonly /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a trivial thing, but maybe have the result input all be on one line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Yes that's a bit unclean. (Probably some unintended auto-wrapping by my editor?)
LGTM too.
|
Yes, you can also set events by setting the |
No description provided.