Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upSending Json.Value over a Port doesn't Work #22
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
maxsnew
Nov 29, 2014
Contributor
Furthermore, adding the necessary $Native$Json = Elm.Native.Json.make(_elm) then results in another error:
Initialization Error on port 'out':
$Native$Json.toJS is not a function
|
Furthermore, adding the necessary
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
maxsnew
Nov 29, 2014
Contributor
I think the bug is this line: https://github.com/elm-lang/elm-compiler/blob/92be75c649fe8b5010893c9be30b2ae5177b207a/src/Generate/JavaScript/Ports.hs#L166 it should just return the value as-is since it's already a JS value
|
I think the bug is this line: https://github.com/elm-lang/elm-compiler/blob/92be75c649fe8b5010893c9be30b2ae5177b207a/src/Generate/JavaScript/Ports.hs#L166 it should just return the value as-is since it's already a JS value |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Nov 29, 2014
Member
Thanks for the report and finding the root issue. elm/compiler@530fe17 should fix it. I think there are similar issues lurking in the ports code, so I'm going to add it to my pre-0.14 todo list to go through and check for any more stuff like this.
|
Thanks for the report and finding the root issue. elm/compiler@530fe17 should fix it. I think there are similar issues lurking in the ports code, so I'm going to add it to my pre-0.14 todo list to go through and check for any more stuff like this. |
maxsnew commentedNov 29, 2014
File
Compile this to a file
main.jsand then open this html file:and get the error: