Engrain by ByteRush

WEB.04 3 concepts · 1 ready

Observers

Use observer APIs instead of polling and scroll handlers.

  1. WEB.04.01IntersectionObserverCoreMid-level10 min
  2. WEB.04.02ResizeObserver and MutationObserverMid-levelBeing written
  3. WEB.04.03PerformanceObserver and timing APIsSeniorBeing written

Interview questions in this module

  1. How would you implement lazy loading of images without scroll listeners?
  2. What is IntersectionObserver's rootMargin for?
  3. When would you use MutationObserver?
  4. How do you measure a custom performance metric in the browser?