browser
browser copied to clipboard
A platform detection API
It would be nice to have access directly in the browser package, navigator.platform and navigator.userAgent without having to pass it on initialization on the js side (as mentioned here: https://stackoverflow.com/questions/40616946/how-to-detect-browser-in-elm). This would simplify APIs that would otherwise need this information passed in.
A workaround I've used is to create a webcomponent that used a custom init event to notify Elm of this information. https://github.com/mweiss/elm-rte-toolkit/blob/1.0.1/js/elmEditor.js#L359