Skip to content
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

API comparison to previous DOM package. #7

Open
dmitshur opened this issue Oct 2, 2018 · 2 comments
Open

API comparison to previous DOM package. #7

dmitshur opened this issue Oct 2, 2018 · 2 comments
Labels
question Further information is requested

Comments

@dmitshur
Copy link

dmitshur commented Oct 2, 2018

How does the API of this package compare to honnef.co/go/js/dom, a popular DOM package for GopherJS? /cc @dominikh

honnef.co/go/js/dom has issue dominikh/go-js-dom#57 to make API changes to make it possible to add WebAssembly support.

Just wanted to put this on your radar if it's not already, or ask about the design differences so I can understand this package better. Thanks!

@dennwc
Copy link
Owner

dennwc commented Oct 12, 2018

This library was meant to be more opinionated and adapt Web APIs to Go in a more natural way.

Part of the goal is to also reflect the platform-agnostic nature of Go by providing libraries that cover other Web technologies that interoperate with the browser. Right now the package provides a symethric net-like implementation of WebSockets for both js and a server environment to cover Browser<->Server commpunication, and an implementation of native messaging to cover Browser<->Desktop communication. WebRTC will also be implemented to provide Browser<->Browser communication channel.

In the same spirit, it will provide high-level interfaces for Local/Session Storage and some of the KV backends for Go.

Thus, the end goal is to provide a set of ready-to-use solutions for common problems related to Web development in Go. I hope this answer your question :)

@dennwc dennwc added the question Further information is requested label Oct 12, 2018
@dmitshur
Copy link
Author

I see, thanks for the answer!

net-like implementation of WebSockets for both js

Just checking, are you familiar with https://github.com/gopherjs/websocket? You can use it if you don't wish to reimplement that functionality yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants