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
Note: this is a very rough sketch of a proposal to serve as a reference in other issues, more design work is required to make it fully practical.
Proposal
If a user type implements Externalizer interface, GopherJS will use the result of Externalize() method when exporting this object to JavaScript. Otherwise standard conversion rules are applied.
If a user type implements Internalizer interface, GopherJS will create a new Go type instance and call Internalize() method on it, passing the original *js.Object in, and will use the instance as internalized value.