on 577fc17 help sign in
elk/libraries/Window.elm
27 lines 654 B history raw
2module Window where
4{-| Provides information about the container that your Elm program lives in.
5When you embed Elm in a `<div>` it gives the dimensions of the container, not
6the whole window.
8# Dimensions
9@docs dimensions, width, height
11-}
13import Signal (Signal)
14import Native.Window
16{-| The current width and height of the window (i.e. the area viewable to the
17user, not including scroll bars). -}
18dimensions : Signal (Int,Int)
19dimensions = Native.Window.dimensions
21{-| The current width of the window. -}
22width : Signal Int
23width = Native.Window.width
25{-| The current height of the window. -}
26height : Signal Int
27height = Native.Window.height