Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add focus parameter to strategy or criteria #18

Open
serbel opened this issue Feb 20, 2018 · 0 comments
Open

Add focus parameter to strategy or criteria #18

serbel opened this issue Feb 20, 2018 · 0 comments
Assignees

Comments

@serbel
Copy link

serbel commented Feb 20, 2018

The OpenVV library considers Element as visible even if page has no focus. So when user minify browser or goes to another tab, MRC event will fire independently. It would be more correct viewablity measure if you add focus check and reset timers when page loses focus. Focus might be added as default for all events or as a tunable option in criteria, e.g.:

criteria = {
inViewThreshold: 0.5,
timeInView: 2000,
considerFocus: true
// "true" if Document must be in focus, or "false" if focus can be ignored
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants