Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A platform detection API #111

Open
mweiss opened this issue Apr 9, 2020 · 0 comments
Open

A platform detection API #111

mweiss opened this issue Apr 9, 2020 · 0 comments

Comments

@mweiss
Copy link

mweiss commented Apr 9, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant