It seems I have to give it a main function and use Html.App.program, which in turn requires me to define a view function.
Is there any way to expose ports to JS -without- defining a full blown main + view ?
Just using Elm for implementing a library ?
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
view is required in Html.App.program
Removing main entirely does not work either.. elm just won't run anything in that case.
Could you post an example showing send + subscribe ?
Maybe such a Elm call (send with result) could be packaged a a JS promise too (?)
Thanks!Guess you mean somehow combining (join, merge..) 2 Observables (sending + receiving to/from a port) to correlate the request(=send) with the reply(=subscribe-callback) ?
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Do you think a correlating by Id is necessary ?
If it is the simple case of having only 1 inbound and 1 outbound port in Elm and doing nothing async in Elm ... isn't a send/receive in JS basically synchronous ?
A promise could still make sense but that Id would not be necessary.
Some explanation in the Elm Guide would help a lot here.
Just to clarify, I talk about calling Elm from JS.
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.