IntersectionObserver API - In 60 Seconds

Veröffentlicht am: 12 April 2016
auf dem Kanal: Wilson Page
5,629
101

The `IntersectionObserver` is used to detect when an element crosses-over (intersects) or gets within a given range of a `root` element.

It's primary use-case is to observe when elements are within (or close to) a scroll viewport, to trigger lazy-loading of content or purposes of telemetry (ad impressions). The `IntersectionObserver` API negates the need to perform costly measurements inside `'scroll'` handlers, which is a very common cause of jank on the web today.

Currently the `IntersectionObserver` is only available in Chrome Canary, but there is a bug [3] tracking Gecko implementation.

LINKS

[1] Live Demo (requires Chrome Canary) - http://wilsonpage.github.io/in-sixty/...
[2] Explainer - https://github.com/WICG/IntersectionO...
[3] Gecko Bug - https://bugzilla.mozilla.org/show_bug...
[4] Twitter -   / wilsonpage  


Auf dieser Seite können Sie das Online-Video IntersectionObserver API - In 60 Seconds mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Wilson Page 12 April 2016 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 5,629 Mal angesehen und es wurde von 101 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!