Skip to content

Use js.Any instead of interface{}. #7

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

Merged
merged 1 commit into from
Jan 17, 2015
Merged

Use js.Any instead of interface{}. #7

merged 1 commit into from
Jan 17, 2015

Conversation

dmitshur
Copy link
Contributor

Related to change in gopherjs/gopherjs@1dae489.

This fixes an issue upstream when trying to build playground.go. The following snippet:

box := angularjs.ElementById("output")
box.SetProp("scrollTop", box.Prop("scrollHeight"))

Produces an error:

playground.go:293:30: can't convert js.Object/js.Any to other interface type

This PR fixes that problem and allows playground.go to build successfully.

I've applied the change to SetVal also because it looks similar, but that is untested.

Please review because I am not yet very familiar with js.Any.

@neelance
Copy link
Owner

LGTM. Thx.

neelance added a commit that referenced this pull request Jan 17, 2015
Use js.Any instead of interface{}.
@neelance neelance merged commit a898e7a into neelance:master Jan 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants