1.0.1 • Published 3 years ago

@the-sett/elm-browser-info v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Contacts for Support

elm-browser-info

elm-browser-info provides a simple and minimal API for discovering information about the browser code is running under.

Setting up the javascript side and implementing the Elm ports

The javascript code is also available as an npm package. To install the npm package do:

> npm install @the-sett/elm-browser-info

As packages with ports cannot be published, the types of the ports are defined instead. It is up to the user of this package in an application to provide the port implementations.

Add these port definitions to your Elm application:

port module Ports exposing (..)

import BrowserInfo exposing
    ( BrowserInfoResponsePort
    , GetBrowserInfoPort
    )

port getBrowserInfoPort : GetBrowserInfoPort msg


port browserInfoResponsePort : BrowserInfoResponsePort msg
1.0.1

3 years ago

1.0.0

3 years ago