Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

Awesome Lists containing this project

README

        

# elm-page-visibility

Library for using the Page Visibility API in Elm.

## Usage

```elm
import PageVisibility

model : Signal Model

simulation : Signal Model
simulation =
Signal.map2 simulate PageVisibility.visible model

simulate : Bool -> Model -> Model
simulate isVisible model =
if isVisible then
step model
else
model
```