puppeteer / examples

Use case-driven examples for using Puppeteer and headless chrome

Home Page:https://developers.google.com/web/tools/puppeteer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pages failing the lazyimages_without_scroll_events.js test

Fb16455 opened this issue · comments

Hi.

I ran .lazyimages_without_scroll_events.js to test two webpages that uses different approachs for lazy loading images: one with IntersectionObserver and another with event listeners (DOMContentLoad, scroll,resize).

Both pages didn't pass the test for some reason.

I expected that the page with the IntersectionObserver would not fail the test, since the images are loaded onece the elementes are on the viewport and the users doesn't need to scroll to it.

The same with the page with event listeners. Despite using the scroll event, this is not the only event that triggers the image to load. The page also uses the DOMContentLoaded event, so users can see hidden images as soon as the page loads (if the element is in the viewport when the page is loaded). That said, I don't understand why the page didn't pass the test.

If anyone can help me understand why those pages have not passed the tests, I would appreciate it.

Thanks in advance!