the-sett / elm-browser-info / BrowserInfo

A ports package for getting information on the browser agent, version and so on.

Ports to talk to the JS side.


type alias BrowserInfoResponsePort msg =
(Json.Decode.Value -> msg) -> Platform.Sub.Sub msg

Port to receive browser info.


type alias GetBrowserInfoPort msg =
() -> Platform.Cmd.Cmd msg

Port to request browser info.

Decoder for the results.


type BrowserInfo
    = Chrome
    | Firefox
    | Safari
    | Opera
    | Edge
    | Unknown

Documents the browser agent.

decodeBrowserInfo : Json.Decode.Decoder BrowserInfo

Decode for browser info.