Have a link open a new window/tab

610 views
Skip to first unread message

Patrick Ester

unread,
Apr 10, 2015, 12:07:04 PM4/10/15
to elm-d...@googlegroups.com
I have the links working just fine in Elm, but I am wondering if it would be possible to have the link open a new window or tab. Thanks in advance.

Thomas Weiser

unread,
Apr 10, 2015, 12:55:23 PM4/10/15
to elm-d...@googlegroups.com

Do you mean like that:

import Html (a, text)
import Html.Attributes (href, target)

link = a [href "http://elm-lang.org/", target "_blank"] [text "Elm"]

If you ask about a solution with Graphics.Element, I don’t think there is one without modifying the library.

Patrick Ester

unread,
Apr 10, 2015, 1:46:05 PM4/10/15
to elm-d...@googlegroups.com
I was originally thinking with Graphics.Element as that is how I have it working now. Thanks for the HTML version. I will use that instead.
Reply all
Reply to author
Forward
0 new messages