Skip to content

Commit

Permalink
Update readme with auto-asses elements with data-onscreenness, and in…
Browse files Browse the repository at this point in the history
…stall info
  • Loading branch information
Onno van der Zee committed Jun 24, 2019
1 parent 74b8ca2 commit f4cc0b5
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ All specified queries can be removed:
onScreenness.reset();


## Automatic pick-up
Onscreenmess will also watch the html for elements with a data attribute. In this case no further scripting is needed.

<section data-onscreenness></section>


## Have the onscreen presence data
When the visible part of the webpage changes, the onscreenness of the collected elements is assesed.

Expand All @@ -53,7 +59,13 @@ You could script on it.

[see demo folder](./demo)

## Inner workings
## ...

### Install for vanilla javascript-app
PLace the following code in the HEAD of your webpage:

<script src="https://unpkg.com/onscreenness@latest"></script>


### Triggers for assesment of presence
* readystatechange to interactive
Expand Down

0 comments on commit f4cc0b5

Please sign in to comment.