-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
js/wasm: introduce scope for JS object #72786
base: master
Are you sure you want to change the base?
Conversation
This PR (HEAD: ef681aa) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/656595. Important tips:
|
Message from Jorropo: Patch Set 1: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/656595. |
Message from Go LUCI: Patch Set 1: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2025-03-11T09:52:22Z","revision":"89efd54aa921fd8240ebee2e2e21469bb32bcab8"} Please don’t reply on this GitHub thread. Visit golang.org/cl/656595. |
Message from Jorropo: Patch Set 1: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/656595. |
Message from Go LUCI: Patch Set 1: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/656595. |
Message from Go LUCI: Patch Set 1: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/656595. |
Message from Zxilly Chou: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/656595. |
Message from Romain Doumenc: Patch Set 1: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/656595. |
This changes allow to attach a JS object (e.g. browser component) to a
js/wasm Go program. This creates a scope to only capture relevant events,
enabling Web applications mixing Go / native components.
An example use is discussed in the GitHub issue.
Implementation-wise, this contains two changes:
go.scope when it has been provided, or else window/global.
A small test uses a dummy object to perform a simple get/set action on this
new field.
Fixes #56084