mirror of
https://github.com/golang/go
synced 2024-09-15 22:20:06 +00:00
syscall/js: add a note about a bug in TypedArray
Fixes #29355 Change-Id: I4018d420c8d413b2681744af18ffb65da03ac504 Reviewed-on: https://go-review.googlesource.com/c/155778 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Richard Musiol <neelance@gmail.com>
This commit is contained in:
parent
bd98628676
commit
43732816be
|
@ -25,6 +25,11 @@ var (
|
|||
var _ Wrapper = TypedArray{} // TypedArray must implement Wrapper
|
||||
|
||||
// TypedArray represents a JavaScript typed array.
|
||||
//
|
||||
// BUG(neelance): The typed array currently becomes inaccessible when Go requests more memory
|
||||
// from the WebAssembly host. It is recommended to only use the typed array synchronously
|
||||
// without keeping a long-lived reference. You can also check if the length property is zero
|
||||
// to detect this detached state of the typed array.
|
||||
type TypedArray struct {
|
||||
Value
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue