You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
This is for a WASM target.
What did you do?
It's common for even handler in Javascript to not return a value at all. This is most analog to 'js.Undefined()' in js.go. Handle event tries to set result which subsequently fails because it calls ValueOf which doesn't support the undefined type. (
smoyer64
changed the title
syscall/js: Common DOM event handler pattern fails during handleEvent()
syscall/js: Common DOM event handler pattern panics during handleEvent()
Nov 12, 2020
What version of Go are you using (
go version
)?1.15.4
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?This is for a WASM target.
What did you do?
It's common for even handler in Javascript to not return a value at all. This is most analog to 'js.Undefined()' in
js.go
. Handle event tries to setresult
which subsequently fails because it callsValueOf
which doesn't support the undefined type. (go/src/syscall/js/js.go
Line 162 in 26a8607
What did you expect to see?
I expected the click handler to return after changing attributes of the element
What did you see instead?
The program panicked and the WASM code stopped executing in the browser.
The text was updated successfully, but these errors were encountered: