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
The pull request which attempts to fix this is #35.
I'll try to find time soon to look at it again.
The reason it wasn't merged long ago is because it's still unclear what type to use for representing state. The PR currently uses interface{}, but I want to confirm whether or not that's the best API to go with.
any update on this? in browser state is a javascript/json object defined by the user/client so I guess interface is the "right" go type. What else does Go use to define "any" type?
After a bit more consideration I believe this is a bit more complex and I don't really understand what value type history.Get returns or history.Set expects . Ideally we should marshal/unmarshal the state before to send it to make sure it's encoded per our specifications but I'm not sure if syscall/js is happy with our encoded json
Activity
dmitshur commentedon Jul 17, 2017
The pull request which attempts to fix this is #35.
I'll try to find time soon to look at it again.
The reason it wasn't merged long ago is because it's still unclear what type to use for representing state. The PR currently uses
interface{}, but I want to confirm whether or not that's the best API to go with.[-]Can't obtain window.history[/-][+]window.History() is not implemented.[/+]inliquid commentedon Jul 12, 2019
@dominikh any idea when will this be implemented? I'm using dom lib but have to revert to
gopherjs/gopherjs/jsin this particular case.mihaiav commentedon Nov 2, 2019
any update on this? in browser
stateis a javascript/json object defined by the user/client so I guess interface is the "right" go type. What else does Go use to define "any" type?mihaiav commentedon Nov 2, 2019
After a bit more consideration I believe this is a bit more complex and I don't really understand what value type history.Get returns or history.Set expects . Ideally we should marshal/unmarshal the state before to send it to make sure it's encoded per our specifications but I'm not sure if syscall/js is happy with our encoded json
e.g.