[elm-discuss] Re: How do I open a URL?

2017-01-17 Thread Tomáš Znamenáček
Thank you very much, the port approach worked well for me. T. -- 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

[elm-discuss] Re: How do I open a URL?

2017-01-06 Thread Wouter In t Velt
Over on SO I just posted an answer (see below) to the question there. Your case is different, because you do not have want to navigate away based on a click, but from your update function. In your case, I would suggest to use a port: - Send the url as a string through a port to javascript

[elm-discuss] Re: How do I open a URL?

2017-01-06 Thread Wouter In t Velt
There is this somewhat dirty hack you could use: Supply a one-liner of javascript to an Elm style attribute. Using `attribute` from the `Html.Attributes` library. You could make your own helper that does the redirect: redirectTo : String -> Attribute msg redirectTo destinationUrl =