Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dasch/elm-page-visibility
Library for using the Page Visibility API.
https://github.com/dasch/elm-page-visibility
Last synced: 24 days ago
JSON representation
Library for using the Page Visibility API.
- Host: GitHub
- URL: https://github.com/dasch/elm-page-visibility
- Owner: dasch
- Created: 2015-11-21T16:40:20.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-02T10:08:16.000Z (almost 9 years ago)
- Last Synced: 2023-04-11T15:32:49.532Z (over 1 year ago)
- Language: Elm
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# elm-page-visibility
Library for using the Page Visibility API in Elm.
## Usage
```elm
import PageVisibilitymodel : Signal Model
simulation : Signal Model
simulation =
Signal.map2 simulate PageVisibility.visible modelsimulate : Bool -> Model -> Model
simulate isVisible model =
if isVisible then
step model
else
model
```