Hi Brian!
Thanks for your response
> 1. the problem that you're trying to solve
I have an idea of integrating
Device Orientation with my project. For example, I need to know the position, orientation of the mobile device of a user and react somehow on these actions. Even though the API is still in experimental stage, it's supported in most browsers, so why not try it
> 2. the solutions you've tried that don't require Native code or effects managers
As far as I know, there are two ways of speaking to JS in Elm apps (if there are more, would be cool to know): either ports or effect modules. I chose the second, because I wanted to create a reusable library and share it with the community, since I haven't found one that solves my problem. But I have found similar libraries (for geolocation, page-visibility and even mouse movements, which also depend on listening events on window object) and thought, that effect modules are a common way of implementing reusable behaviour, when you need to subscribe on window events
> 3. why those solutions didn't work
I assume, that ports will work perfectly, but as I mentioned, I wanted to create a reusable library. But if you have any ideas, how I can implement it without interaction with native, it would be cool
> the W3C says is no longer under active maintenance. That rings some warning bells for me!
yea, I think you have a strong argument against creating it. I understand, that community tries to create a reliable ecosystem by supervising the process of creating libraries with unstable pieces of code (but I've got familiar with it only after I tried to publish the package) and the aim is quite cool. So since the API is no longer under active maintenance, I think I can successfully use ports for my project: it's better than creating a dangerous library
But anyway, if you have any thoughts about it, let's discuss it
Thanks,
Igor
среда, 20 июня 2018 г., 22:32:19 UTC+2 пользователь Brian Hicks написал: