Thanks for all your work Evan!
This is a problem I originally posted on Slack and Evan wanted clearer scenario. (Is this the right place to note it?)
I want a function equivalent to `Window.size : Task x Position` that exists in current `elm-lang/window` package and does not exist in 0.19 packages. I found `Browser onWindow "resizes"` can do the same as `Window.resizes` but it does not give the initial window size.
Two projects are currently using it.
1. jinjor/elm-contextmenu
The `Contextmenu` module need to know window width and height to calculate where to show the menu. It should not go outside of the window, so the left position is the smaller of (1) `clicked_position.x` (2) `window.width - menu.width`. As a library, I don't want to say `you must get window size in JS world and pass it via flags` in the document.
2. (company web site)
This site is responsive so content changes when the window size changes. `Window.size` is used in `init` function.
Both of them are possibly solved using CSS. But thinking about another solution just costs. (Both are in a maintenance mode.)
Is this enough information for you?
2018年5月10日木曜日 19時01分38秒 UTC+9 Evan Czaplicki: