1
0
mirror of https://github.com/golang/go synced 2024-11-23 11:50:09 -07:00
go/misc
Richard Musiol 6dd70fc5e3 all: add support for synchronous callbacks to js/wasm
With this change, callbacks returned by syscall/js.NewCallback
get executed synchronously. This is necessary for the APIs of
many JavaScript libraries.

A callback triggered during a call from Go to JavaScript gets executed
on the same goroutine. A callback triggered by JavaScript's event loop
gets executed on an extra goroutine.

Fixes #26045
Fixes #27441

Change-Id: I591b9e85ab851cef0c746c18eba95fb02ea9e85b
Reviewed-on: https://go-review.googlesource.com/c/142004
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-11-10 11:57:17 +00:00
..
android misc/android: forward SIGQUIT to the process running on the device 2018-05-23 18:18:39 +00:00
arm all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
cgo runtime: never call into race detector with retaken P 2018-11-09 21:47:48 +00:00
chrome/gophertool
git
ios misc/ios: remove note from output of detect.go 2018-10-24 15:33:31 +00:00
linkcheck
nacl cmd/vendor: update github.com/google/pprof 2018-11-07 12:27:21 +00:00
sortac
swig cmd/go: fix swig support and run swig tests during run.bash 2017-11-16 17:19:19 +00:00
trace misc/trace: update trace_viewer_full.html 2018-04-26 20:26:23 +00:00
wasm all: add support for synchronous callbacks to js/wasm 2018-11-10 11:57:17 +00:00
benchcmp
editors