You can use Browser.document
instead as the Elm app takes the whole page
I would put this in the Main.elm
, replacing Msg
. It will avoid the Cmd.map
in the init
for example. In functions in HttpRequests
I would give the message as parameter.
Ex:
listNames : (Result Http.Error (List TopicName) -> msg) -> Cmd msg