While passive event listeners are an improvement, they are not a complete solution. It's more like the "least of evils". There is a new set of primitives that is being implemented called IntersectionObserver which solves most of the issues of having to detect when something is in view + they run on a separate thread. So you don't need to do any computations, reading the window size and whatnot magic to detect if an element is inside the window. We are currently using this in prod for our algolia static websites and it has worked very well for the majority of all of our use cases.
https://github.com/WICG/IntersectionObserver/blob/gh-pages/e...
rjbwork|8 years ago
SimeVidas|8 years ago
eyelidlessness|8 years ago