ApoorvSaxena / ApoorvSaxena/lozad.js

Test coverage of responsive <picture> scenarii

未关闭
#93 7 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
7.5k
派生
435
PR 合并指标
30 天内没有已合并 PR

描述

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 ?

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。