kennethcachia / background-check

Automatically switch to a darker or a lighter version of an element depending on the brightness of images behind it.
http://kennethcachia.com/background-check/
MIT License
3.27k stars 281 forks source link

Remove spurious "x is not a target" exceptions when refresh called on a target offscreen #80

Open frankier opened 8 years ago

frankier commented 8 years ago

Currently if you try to .refresh() an element off screen, found will not get set to true, and check throws the "x is not a target" exception. I don't think the caller should have to check if the element is on screen, so this just suppresses the error in this case.