browser icon indicating copy to clipboard operation
browser copied to clipboard

A platform detection API

Open mweiss opened this issue 5 years ago • 0 comments

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

mweiss avatar Apr 09 '20 20:04 mweiss