The Wayback Machine - https://web.archive.org/web/20211106194951/https://github.com/gopherjs/gopherjs/wiki/Bindings
Skip to content

Bindings

Nevkontakte edited this page Aug 19, 2021 · 64 revisions

Bindings to JavaScript

Isomorphic Libraries

These libraries expose the same API for native architectures (386, amd64, arm) and js architecture. Using them allows writing isomorphic Go code (same Go code that can run in backend and frontend).

Frameworks using GopherJS

Utility functions

  • jsutil.Wrap: Wrap returns a wrapper func that handles the conversion from native JavaScript js.Object parameters to other types. For details see issue 93 (comment).
  • Promise: A Promises/A+ implementation in Go that allows easily exposing idiomatic synchronous Go code to JS by returning a promise.