Closed nhooyr closed 5 years ago
Probably a good idea to wait until the wasm support becomes more mature.
Don't really think this is worth doing. Based on the current js API, I don't think Go has a shot at becoming a solid frontend language so I wouldn't want to spend time on this.
Definitely open to revisiting this in the future when WASM support is more mature.
Nvm, I think I this should be done. See https://www.reddit.com/r/golang/comments/b6y4h4/vugu_a_modern_ui_library_for_gowebassembly/
People do want to write frontend's in Go, I get it, the JS eco system isn't really good.
Not 100% sure on this now as passing a custom net/http client will not work.
I guess it'd just become a no-op. Seems janky for sure though but a lot of Go probably doesn't work in wasm so it should be fine.
Another issue is that the browser has a websocket status code for when the tls handshake fails whereas we just return the handshake error and we can't return a *http.Response
from Dial.
I don't think this is worth it, lets revisit in the future.
https://github.com/golang/go/issues/27311
Can't really support the current API, browser API is different and much less expressive.