ApoorvSaxena / ApoorvSaxena/lozad.js

Test coverage of responsive <picture> scenarii

Aperta
#93 7 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
7.5k
Fork
435
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Attempting to make a PR to solve #92, I tried to implement a set of tests for responsive images using ``tags.

It's not that easy, because `js-dom`(used for tests) doesn't replicate the browser behavior of triggering a `src` attribute set in the ``tag injected by lozad, according to media queries defined on ``elements.

I tried using `mq-polyfill` and `canvas` or `canvas-prebuilt`, with no luck so-far.

* Do you see a way to do that correctly with js-dom ?
* If not, should we / can we use a more heavy approach ? (using an automated headless browser, like pupetteer) ?

What do you think ?

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.