Basically, you need two ports to call out to an external method - one for you to pass out the arguments, and one for you to get the return value back. The JavaScript interop section <https://guide.elm-lang.org/interop/javascript.html> of the guide demonstrates how to do this :)
On Thursday, October 13, 2016 at 10:00:47 AM UTC+1, António Ramos wrote: > > hello i know that i have to use ports to pass data from elm to javascript > but if i want to call an external library method inside my elm is there a > way to do it? > As i load my exeternal js file before my compiled elm in my index.html > file there should be a way right? > > regards > António > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.